Working with Maven snapshots [message #750165] |
Tue, 25 October 2011 13:05  |
Eclipse User |
|
|
|
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 11:15  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03886 seconds