There are a few ways to handle this. First off, if you have related
projects, POM inheritance may well be a good way to go; it allows you to
specify dependencies like this once only.
Another approach (which seems to be used by the maven devs) is to use
SNAPSHOT builds and 'flip' them to timestamped dependencies when you
want to do a release. I dunno what the state of the release plugin is,
you might want to try it out.
A third approach if this is a team issue would be to work with SNAPSHOTS
more during development. Your component might be eg 1.4.3, but the
'main projects' would depend on 1.4-SNAPSHOT (ie the latest 1.4) until
release time, when you'd manually change it to
1.4.somethingmorerepeatable. This is possible with jars on ibiblio
because I understand there's stuff up there maintaining links to
snapshot versions - can anybody clarify this? However unless you have
something which 'acts like' ibiblio you can't do this for your
So..... I've updated my repository webapp (attached maven project) to
respond to requests for 'somejar-9.3-SNAPSHOT.jar' (for example) with
the most recently modified file matching the regexp
somejar-9\.3.*\.jar (or the 'real' SNAPSHOT jar if it exists). This
isn't ideal - it will get things wrong if eg you upload "1.4.1" after
"1.4.2" - and wont play well with branches being developed
simultaneously. However, it does let you specify a SNAPSHOT dependency
without actually having a SNAP on the corporate repo.
Instructions for the webapp were posted a coupla weeks back, but theres
only 5 classes, its easy to figure out.
Hope this helps.
Taft, Jason wrote:
From: Taft, Jason
Sent: Wednesday, May 14, 2003 9:13 AM
To: Maven Users List
Subject: component versioning and usage rationale
I am looking for an explanation of the versioning functionality, and the
intended use cases.
Here is the scenario I am struggling with...
With regard to our internally developed components, we want to depend on the
most recent minor release. For example, we have a 1.4 release. Next week we
have a point release to fix a bug -- 1.4.1 (possibly 1.4.2, 1.4.3, ... in
the future). We want our components to depend on release 1.4, and use the
most recent point release of the 1.4 component.
Any suggestions or comments?