Friday 1 August 2008

maven repository manager

After struggling for a couple of days, I finally managed to set up a local maven repository behind a proxy.
  • I first tried nexus, but it's configuration is very buggy and despite the fact that it don't work for me, it keeps on forgetting my settings if I open on it again.
  • Then I tried artifactory, ant it too looked promising, but for some reason I could not get it to download stuff through a proxy either. To be fair after I figured out that my real problem as that my maven clean plugin was broken, I managed to get artifactory working through a proxy (but I think I like archiva the most at the moment).
  • Then I tried apache archiva, which looked even more promising since it actually had the concept of a network proxy on its configuration screen. After a lot of googling, I found out that its a known (and fixed but un-released) bug in archiva 1.1. (http://jira.codehaus.org/browse/MRM-884). So I installed version 1.0.2 and my downloads began to work!!
The only problem was that as part of testing if this works, I deleted the org directory in my maven repository (as described in the nexus section of the maven difinitve guide).
This caused my `mvn clean` to stop working:
"org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-clean-plugin' does not exist or no valid version could be found"
After a bit of googling I found out that deleting my repository (~/.m2/repository) fixes this problem!
(http://www.mail-archive.com/users@maven.apache.org/msg68288.html)

A last note is that the different repository mangers are surprisingly similar as to how they work and configured. It must be something to with where they all come from.

No comments:

Post a Comment