<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>coffeecoders.de &#187; administration</title>
	<atom:link href="http://coffeecoders.de/tag/administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffeecoders.de</link>
	<description>professional devs at work</description>
	<lastBuildDate>Tue, 13 Sep 2011 16:34:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using GitHub as a personal maven repository</title>
		<link>http://coffeecoders.de/2011/09/using-github-as-a-personal-maven-repository/</link>
		<comments>http://coffeecoders.de/2011/09/using-github-as-a-personal-maven-repository/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 01:24:53 +0000</pubDate>
		<dc:creator>stevie</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[daily tasks]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://coffeecoders.de/?p=294</guid>
		<description><![CDATA[This article will show you how to setup a public GitHub repository as a personal maven repository. Following these steps you will be able to serve any artifact by just added a few lines into your pom.xml. <a href="http://coffeecoders.de/2011/09/using-github-as-a-personal-maven-repository/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sometime you are in need for a maven repository accessible from the net which is under your control. Reasons might be:</p>
<ul>
<li>a 3rd-party lib is not on Maven central or the desired version is missing</li>
<li>you built modules/libraries which will be included in your other projects</li>
<li>&#8230;</li>
</ul>
<p>With the following steps you will be able to serve <em>any </em>artifact from a public GitHub repository by just added a few lines into your <strong>pom.xml</strong>. I personally wasted quite an amount of time on this topic so I guess I&#8217;ll save it here &#8211; for you <strong>and</strong> me.</p>
<p><span id="more-294"></span>Ready? Let&#8217;s start!</p>
<p>In our example we&#8217;ll use our GitHub repository to server a file which is not available at Maven Central as the time of writing.</p>
<h2>1. Creating the GitHub repository</h2>
<p>Follow <a title="Create a public repository on GitHub" href="https://github.com/repositories/new" target="_blank">this link</a> and create a new repository named <code>mavenrepo</code>.</p>
<p>You could as well choose a different name but then you will have to change every occurance in the following steps. Your call.</p>
<h2>2. Creating the content for this repository</h2>
<p>Change into the folder where the new repository will be lying on your disk. From here you will be able to push changes into your remote repository and thus update your artifacts.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p294code1'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2941"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p294code1"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">cd</span> dev
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">mkdir</span> mavenrepo
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">cd</span> mavenrepo
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> init
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> remote add origin <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>github.com:YOURUSERNAME<span style="color: #000000; font-weight: bold;">/</span>mavenrepo.git
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">mkdir</span> releases snapshots
<span style="color: #666666; font-style: italic;">#empty dirs can't be added to git</span>
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">touch</span> releases<span style="color: #000000; font-weight: bold;">/</span>README
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">touch</span> snapshots<span style="color: #000000; font-weight: bold;">/</span>README
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> add .
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Initial setup&quot;</span>
<span style="color: #666666; font-style: italic;">#update the GitHub repo just for kicks</span>
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> push origin master</pre></td></tr></table></div>

<p>Cool, your local maven repository is waiting for it&#8217;s first artifact.</p>
<h2>3. Creating the first artifact</h2>
<p>Now you have to change to the location of your artifact-to-be.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p294code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2942"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code" id="p294code2"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>GoogleAnalyticsAndroid_1.3.1
~<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>GoogleAnalyticsAndroid_1.3.1<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ls</span>
libGoogleAnalytics.jar sample ReadMe.txt
<span style="color: #666666; font-style: italic;">#explanation below</span>
~<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>GoogleAnalyticsAndroid_1.3.1<span style="color: #000000; font-weight: bold;">&gt;</span>mvn deploy:deploy-file <span style="color: #660033;">-DgroupId</span>=com.google.android.apps <span style="color: #660033;">-DartifactId</span>=analytics <span style="color: #660033;">-Dversion</span>=1.3.1 <span style="color: #660033;">-Dpackaging</span>=jar <span style="color: #660033;">-Dfile</span>=<span style="color: #ff0000;">&quot;libGoogleAnalytics.jar&quot;</span> <span style="color: #660033;">-Durl</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Scanning <span style="color: #000000; font-weight: bold;">for</span> projects...
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Building Maven Stub Project <span style="color: #7a0874; font-weight: bold;">&#40;</span>No POM<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">---</span> maven-deploy-plugin:<span style="color: #000000;">2.5</span>:deploy-file <span style="color: #7a0874; font-weight: bold;">&#40;</span>default-cli<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">@</span> standalone-pom <span style="color: #660033;">---</span>
Uploading: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>1.3.1<span style="color: #000000; font-weight: bold;">/</span>analytics-1.3.1.jar
Uploaded: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>1.3.1<span style="color: #000000; font-weight: bold;">/</span>analytics-1.3.1.jar <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">43</span> KB at <span style="color: #000000;">751.5</span> KB<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Uploading: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>1.3.1<span style="color: #000000; font-weight: bold;">/</span>analytics-1.3.1.pom
Uploaded: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>1.3.1<span style="color: #000000; font-weight: bold;">/</span>analytics-1.3.1.pom <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">400</span> B at <span style="color: #000000;">24.4</span> KB<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Downloading: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>maven-metadata.xml
Uploading: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>maven-metadata.xml
Uploaded: <span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>com<span style="color: #000000; font-weight: bold;">/</span>google<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>analytics<span style="color: #000000; font-weight: bold;">/</span>maven-metadata.xml <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">307</span> B at <span style="color: #000000;">23.1</span> KB<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> BUILD SUCCESS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Total <span style="color: #000000; font-weight: bold;">time</span>: 1.121s
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Finished at: Sun Sep <span style="color: #000000;">11</span> 01:05:09 CEST <span style="color: #000000;">2011</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Final Memory: 3M<span style="color: #000000; font-weight: bold;">/</span>77M
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span></pre></td></tr></table></div>

<p>That&#8217;s (almost) it. Wait, what? No worries, I will explain the whole line for you so you can easily adjust it to your needs.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p294code3'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2943"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p294code3"><pre class="bash" style="font-family:monospace;">mvn deploy:deploy-file 
		<span style="color: #666666; font-style: italic;">#this specifies the artificat and will (=should) match with your dependency-declaration in pom.xml	</span>
		<span style="color: #660033;">-DgroupId</span>=com.google.android.apps <span style="color: #660033;">-DartifactId</span>=analytics <span style="color: #660033;">-Dversion</span>=1.3.1 \ 
		<span style="color: #660033;">-Dpackaging</span>=jar \ <span style="color: #666666; font-style: italic;">#deploy as jar </span>
		<span style="color: #660033;">-Dfile</span>=<span style="color: #ff0000;">&quot;libGoogleAnalytics.jar&quot;</span> \ <span style="color: #666666; font-style: italic;">#source file to deploy</span>
		<span style="color: #660033;">-Durl</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">/</span>releases <span style="color: #666666; font-style: italic;">#target folder to deploy</span></pre></td></tr></table></div>

<p>For 3rd-party-libraries which aren&#8217;t subject to change (i.e. no snapshots) use the releases folder for your own snapshots use &#8211; you guessed it &#8211; the snapshots folder.</p>
<p>Your maven repository is almost ready to serve.</p>
<h2>4. Online artifacts!</h2>
<p>Let&#8217;s change back to the maven repository. To make everything world accessible we have to commit and push the files.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p294code4'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2944"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p294code4"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>GoogleAnalyticsAndroid_1.3.1<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo
<span style="color: #666666; font-style: italic;"># add everything which has changed or is new</span>
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> add .
<span style="color: #666666; font-style: italic;"># commit everything into the git-repo</span>
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Add Google Analytics library 1.3.1&quot;</span>
<span style="color: #666666; font-style: italic;"># push it to GitHub</span>
~<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mavenrepo<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">git</span> push origin master</pre></td></tr></table></div>

<p>So cool,eh? You can jump online to your GitHub repository to check if they&#8217;re there as expected. Aaalmost done.</p>
<h2>5. Using your new maven repository</h2>
<p>There are two ways to make maven aware of new repositories besides the pre-configured one. Either in <code>~/.m2/repositories/settings.xml</code> which would be global for every repository but just for your user account. Or you can add the information into the <code>pom.xml</code> of your project. Since we want all developers for this project to easily use the new repository we will use the later.</p>
<p>Open your pom.xml and add the following lines for our example. Of course you have to edit the group-id, artifact and version according to your lib.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://coffeecoders.de/wp-content/plugins/wp-codebox/wp-codebox.php?p=294&amp;download=pom.xml">pom.xml</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2945"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code" id="p294code5"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelversion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelversion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #808080; font-style: italic;">&lt;!-- ... more project definition --&gt;</span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.google.android.apps<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>analytics<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.3.1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #808080; font-style: italic;">&lt;!-- more dependecies... --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #808080; font-style: italic;">&lt;!-- build config etc. ... --&gt;</span>
&nbsp;
    	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>YOURUSERNAME-snapshots<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>https://raw.github.com/YOURUSERNAME/mavenrepo/master/snapshots<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>always<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>warn<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>never<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>fail<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>YOURUSERNAME-releases<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>always<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>fail<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>always<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/updatepolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>warn<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/checksumpolicy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>https://raw.github.com/YOURUSERNAME/mavenrepo/master/releases<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>That&#8217;s it! </p>
<h2>6. Final: See it in action</h2>
<p>Now we can start up maven to make use of the new configuration.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p294code6'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2946"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p294code6"><pre class="bash" style="font-family:monospace;">mvn clean package</pre></td></tr></table></div>

<p>If everything went well you should see &#8220;BUILD SUCCESS&#8221; and if you scroll up a bit you should see some Download-lines regarding your new repository. Maven will now try to load every new dependency from your GitHub-maven-repo so you can always decide if you want to host it yourself for some reason.</p>
<p>If you encountered errors along the way please let me know. This post is the result of several hours of trail and error and you should be fine following it. But of course it&#8217;s always possible you&#8217;ll run into problems. </p>
<p><strong>Update:</strong>I noticed that I used the wrong group-id for my example. Normally it doesn&#8217;t hurt but it confuses everyone and so to be perfect added &#8220;.apps&#8221; to every occurance of this package-name.</p>
 <p><a href="http://coffeecoders.de/?flattrss_redirect&amp;id=294&amp;md5=60e7748ea983eddf8145a77b385f36ab" title="Flattr" target="_blank"><img src="http://coffeecoders.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://coffeecoders.de/2011/09/using-github-as-a-personal-maven-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid off phpmail()!</title>
		<link>http://coffeecoders.de/2009/08/get-rid-off-phpmail/</link>
		<comments>http://coffeecoders.de/2009/08/get-rid-off-phpmail/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 13:06:29 +0000</pubDate>
		<dc:creator>stevie</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://coffeecoders.de/?p=222</guid>
		<description><![CDATA[Dear sysadmins and developers, phpmail() IS OUT! Get rid off it. Now! One of the most common sources of spam are &#8220;hacked&#8221; webservers and poorly or even non-secured forms. By using phpmail the webserver must be allowed to send mails &#8230; <a href="http://coffeecoders.de/2009/08/get-rid-off-phpmail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Dear sysadmins and developers,</p>
<p><a href="http://www.php.net/phpmail">phpmail()</a> IS OUT! Get rid off it. Now!</p>
<p>One of the most common sources of spam are &#8220;hacked&#8221; webservers and poorly or even non-secured forms. By using phpmail the webserver must be allowed to send mails without checks for a valid sender. This results &#8211; mostly on a shared web host &#8211; in having checking every clients installations for the bad script while the mailserver gets blacklisted due to the spam wave.<br />
<span id="more-222"></span><br />
There are enough possibilities out there on how to send mail without using phpmail such as <a href="http://pear.php.net/package/Net_SMTP/">PEAR Net_SMTP</a>. I even encourage every webmaster to turn off phpmail by blacklisting this function in php.ini. This way the developers would be forced to name an smtp account for sending mail which is <em>much</em> easier to track (and shut off if neccessary).</p>
]]></content:encoded>
			<wfw:commentRss>http://coffeecoders.de/2009/08/get-rid-off-phpmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>trac: upgrading trac with easy_install fails with &#8220;unexpected HTML page found&#8221;</title>
		<link>http://coffeecoders.de/2009/08/trac-upgrading-trac-with-easy_install-fails-with-unexpected-html-page-found/</link>
		<comments>http://coffeecoders.de/2009/08/trac-upgrading-trac-with-easy_install-fails-with-unexpected-html-page-found/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 10:55:09 +0000</pubDate>
		<dc:creator>stevie</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://coffeecoders.de/?p=240</guid>
		<description><![CDATA[When installing or upgrading trac on a Debian-like linux machine you might want to use the easy approach of the python setuptools. Trac can be installed or upgraded by using: easy_install http://svn.edgewall.org/repos/trac/branches/0.11-stable Since the release of Subversion 1.5 the version &#8230; <a href="http://coffeecoders.de/2009/08/trac-upgrading-trac-with-easy_install-fails-with-unexpected-html-page-found/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When installing or upgrading trac on a Debian-like linux machine you might want to use the easy approach of the python setuptools. Trac can be installed or upgraded by using:</p>
<p><code>easy_install http://svn.edgewall.org/repos/trac/branches/0.11-stable</code></p>
<p>Since the release of Subversion 1.5 the version of easy_install included in the Debian repository ran into a compatibility issue. <span id="more-240"></span>Instead of working as expected it always complained:</p>
<p><code>error: Unexpected HTML page found at http://svn.edgewall.org/repos/trac/branches/0.11-stable</code></p>
<p>The problem seems to be that the SVN-Web-Output generated by Subversion 1.5+ is not being understanded by setuptools. In the <a href="http://trac-hacks.org/ticket/5512">issue tracker</a> for the trac-plugin-project <a href="http://www.trac-hacks.org">trac-hacks.org</a> I found the easiest way to solve this problem. You will use the setuptools to update itself and then you won&#8217;t have problems anymore:</p>
<p><code>easy_install -U setuptools</code></p>
<p>PS: This problem also occured when trying to install plugins from trac-hacks.org since they also use SVN 1.5+.</p>
 <p><a href="http://coffeecoders.de/?flattrss_redirect&amp;id=240&amp;md5=81fefaa5094762c4a0b3ca4a923c52ce" title="Flattr" target="_blank"><img src="http://coffeecoders.de/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://coffeecoders.de/2009/08/trac-upgrading-trac-with-easy_install-fails-with-unexpected-html-page-found/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

