maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lacoste, Dana (TSG Software San Diego)" <>
Subject RE: Question about version ranges
Date Thu, 10 Sep 2009 23:32:51 GMT
OK, well, I figured PART of it out: using unpack-dependencies instead of unpack allowed me
to use the pom's own dependency mechanism instead of having the dependency-plugin try to obtain
the dependency itself (so the range part worked)

But that doesn't explain why ranges don't work with unpack, or why unpack and unpack-dependencies
both exist....

Dana Lacoste

-----Original Message-----
From: Lacoste, Dana (TSG Software San Diego) 
Sent: Thursday, September 10, 2009 3:29 PM
To: Maven Users List
Subject: Question about version ranges

I'm using 2.0.10 in this instance.

I am breaking down my monolithic gigantic build into sub-components, so that I can build client
separate from server, for example.

For SNAPSHOTs this is working (well, actually, it isn't, but that's another story :) ) but
for RELEASE builds, I'm getting this:

Couldn't find a version in [7.11.093, 7.11.094] to match range [7.11,7.12)

So I have a parent pom defining my "version-range" to be [7.11,7.12) for this case (this is
version 7.11, so I want the latest 7.11 build only.)

If 7.11.093 is considered newer than 7.11 (according to the docs where "any modifier is considered
"newer" than the base) then why doesn't this work?

Note that I changed it to be [7.11.000,7.12.000) and it worked fine, but that seems like it
shouldn't be necessary somehow: in that case if you ever released 1.0 and then had to do an
emergency patch 1.0.1 (not 1.1, because 1.1 is being developed for future stuff: 1.0.1 is
just an emergency patch) then it wouldn't get picked up by the maven version range properly

Similarly, the maven-dependency-plugin doesn't seem to support ranges specified in this way.
 If you put a <version> tag in the dependency plugin then it doesn't work with ranges,
and if you put a <dependency> section in your pom (and remove the <version> tag
from the dependency-plugin part of the build) then it puts a "null" in for the version of
your artifact.  I'm getting around this by using an assembly to extract my dependency instead
of the dependency-plugin, but that just seems silly:

why can't maven handle its own version ranges????

Dana Lacoste

Sample Range that didn't find "7.11.093" :
property defined: RELEASE_VERSION_RANGE as '[7.11,712)'

Sample Range that DID find "7.11.093" :
property defined: RELEASE_VERSION_RANGE as '[7.11.000,712.000)'

pom dependency section for above:

Sample Maven dependency-plugin section that didn't seem to work with above in any way shape
or form:
                 <!-- <version>${RELEASE_VERSION_RANGE} </version> -->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message