`
cjx186
  • 浏览: 265015 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

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>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics