Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Working with Maven snapshots
Working with Maven snapshots [message #750165] Tue, 25 October 2011 17:05 Go to next message
Chris Barnes is currently offline Chris BarnesFriend
Messages: 1
Registered: October 2011
Junior Member
My team is working on a new Virgo project, and we're wondering if there's any way to configure Virgo so that it'll place nice with Maven snapshots. For a production system, the user guide's recommended strategy of just configuring the Maven repository as an external repository in Virgo seems perfectly sensible. However, it seems to fall apart a bit in development environments; unless every developer regularly builds every snapshot, they may not be getting the latest code. In a large, modular project with many component bundles, this is not very feasible.

Maven provides this notion of an "update policy," which lets you specify an expiration date of sorts: it will go back to the central Maven snapshots repository after the specified time to look for a newer snapshot. What I would like to do is provide some way to tell Virgo to ignore an artifact in the repository if it's older than a given threshold; we could then pair that with something like setting up a hosted repository on our central Maven repo that would serve up the latest snapshots.

Is something like this possible currently? If not, it'd be a very nice new feature that would make Maven-powered development easier. Are any other folks working on a Virgo project with Maven, and if so how are you dealing with snapshots?

Thanks!
Re: Working with Maven snapshots [message #757312 is a reply to message #750165] Thu, 17 November 2011 16:15 Go to previous message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
I would usually do a copy from build, i.e. have an pom project with an dependency-copy or an assembly plugin in configuration. Collect all artifacts and copy to virgo repository directory. I decided early on that hassle of pointing external repo to a .m2/repository is not worth it. There could be number of artifacts in there already that match your import -but you really want the one from the bundle that you will ship.

On the project I created two extra repositories in virgo.
1. external - (similar to ext) for all 3rd party dependencies that we had - those did not change often
2. watched - (similar to usr) for all "under development" bundles.

The build would copy over all modified bundles to the repo #2 above. There were some issues where I needed to bounce Virgo but this worked out pretty well. I would also run maven with -U (--update-snapshots) and a local nexus repo.

Hope this help.

Dmitry
Previous Topic:Deploying a WAB with Spring Security 3.0.5 in bundle-classpath
Next Topic:Problem with Hibernate and org.springframework.orm-3.0.5.RELEASE
Goto Forum:
  


Current Time: Fri Apr 19 06:57:57 GMT 2024

Powered by FUDForum. Page generated in 0.01612 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top