On the development shop I work for, we have an internal MAVEN repository, to keep our libraries (proprietary & open-souce). A common problem that we face is that, sometimes, the open-source libraries in our local MAVEN repository gets obsolete. Is there an automatic way to keep all the open-source libraries I use in my MAVEN repository always updated? What do you suggest to resolve this issue?
+4
A:
Archiva has been mentioned, but nexus seems more popular. Both have been designed to solve problems like the one you're having
Marcelo Morales
2009-05-01 07:13:25
I'd second nexus. Sonatype knows Maven better than anyone and have put together a really great product. I wouldn't call it lightweight but it is pretty simple to install and wonderful to use.
sal
2009-05-01 16:57:31
I'll also put my vote in for Nexus. Its dirt simple to setup.
Bob Breznak
2010-10-01 02:20:42
+1
A:
Assuming you:
- Don't want to download everything
- Don't want to run another server process
- Only want to track a limited number of projects
You might want to create a separate pom.xml file with dependencies like this:
<dependency>
<groupId>org.openfoo</groupId>
<artifactId>jfoo</artifactId>
<version>[1.0.0,2.0.0)</version>
</dependency>
This will tell maven to use jfoo 1.0.0 up to jfoo 2.0.0 so when jfoo releases version 1.2.17, you'll be fetching that in the next build assuming your settings are set to check versions each time.
This pom doesn't have to actually build anything. Just list those things you want to track.
Running:
cd the-path-to-the-project; mvn -q -B -U package
Via cron once a day will update all the dependencies in that pom and only report when there is a problem
BTW, this is a hack. If the number of developers is > 3 and you have the resources to run nexus, don't bother with the hack.
sal
2009-05-01 16:33:39
Thanks a lot for your answer! I acctually ended up using Nexus, but your hack made me update ALL the libraries I needed just with a couple of edits in the pom files and one command!
Macalendas
2009-05-04 16:24:03