Google Code personal maven repository

Getting your jar of a library or something to other people can be expensive in terms of time. So you probably have already had a look at the maven central repository guide ... and that is too expensive to set up unless you are a big company. I did the same and I left the argument for a couple of day until I played with maven gae plugin and I saw that it was exposing versions through google code!!!
This is cool, no trouble of any sort at all, no restriction... So how it works though? Easy there are just a few things to look over in your maven pom thanks to the Wagon WebDAV plugin... these are the steps

1. add extension to the build
2. register the repository
3. credential in settings.xml
<extensions>
<extension>
<groupId>org.jvnet.wagon-svn</groupId>
<artifactId>wagon-svn</artifactId>
<version>1.9</version>
</extension>
</extensions>
<distributionManagement>
<repository>
<id>maven-X-repo</id>
<name>Maven Repo for X (releases)</name>
<url>svn:https://X.googlecode.com/svn/maven-repo/releases</url>
<uniqueVersion>false</uniqueVersion>
</repository>
<snapshotRepository>
<id>maven-X-snapshot</id>
<name>Maven Repo X (snapshots)</name>
<url>svn:https://X.googlecode.com/svn/maven-repo/snapshots</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
Make sure to create the folders in svn !!! ... then add to the settings the credentials for the repos (both of them)
<server>
<id>maven-X-repo-releases</id>
<username>xxxx</username>
<password>yyyy</password>
</server>

mvn deploy and you are done!

To use your jar is now easy! Put in the user pom this bit!
<repository>
<id>X</id>
<name>X</name>
<url>http://X.googlecode.com/svn/maven-repo/releases</url>
<repository>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值