You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by dhoffer <DH...@xrite.com> on 2007/04/30 19:26:17 UTC

Artifact version range behavior bug?

Plugins seem to resolve version ranges in an inconsistent manor.  If I have a
dependency version specified as [1.0,) how should this be resolved with
respect to SNAPSHOTS (in the opinion of the maven2 developers)?

Test case:  Assume you have released versions 1.0, 1.1, 1.2, 1.3, 1.4 & 1.5. 
In addition snapshot releases exist for all versions as well as
1.6-SNAPSHOT.
Behavior:  Currently the idea, assembly & dependency plugis resolve this to
version 1.6-SNAPSHOT, however the release plugin trunk logic does not, it
will resolve this to 1.5 (prior beta releases did resolve to 1.6-SNAPSHOT).

In my opinion the later case is how it should behave (resolve to 1.5);
set-notation should never resolve to SNAPSHOTS.  We use set-notation as our
primary dependency management technique for artifacts created inhouse.  We
unbound the high end of the version to mean we want the latest released
version.  If we want SNAPSHOTS to be included we manually change the version
to state this.

Depending on the opinion of the maven2 developers, another option that I
think would also work well is to have another tag in the dependency section
turning on/off inclusion of snapshots, i.e. <includeSnapshots>.
-- 
View this message in context: http://www.nabble.com/Artifact-version-range-behavior-bug--tf3670887s177.html#a10257365
Sent from the Maven Developers mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Artifact version range behavior bug?

Posted by Mark Hobson <ma...@gmail.com>.
On 30/04/07, dhoffer <DH...@xrite.com> wrote:
> Plugins seem to resolve version ranges in an inconsistent manor.  If I have a
> dependency version specified as [1.0,) how should this be resolved with
> respect to SNAPSHOTS (in the opinion of the maven2 developers)?
>
> Test case:  Assume you have released versions 1.0, 1.1, 1.2, 1.3, 1.4 & 1.5.
> In addition snapshot releases exist for all versions as well as
> 1.6-SNAPSHOT.
> Behavior:  Currently the idea, assembly & dependency plugis resolve this to
> version 1.6-SNAPSHOT, however the release plugin trunk logic does not, it
> will resolve this to 1.5 (prior beta releases did resolve to 1.6-SNAPSHOT).
>
> In my opinion the later case is how it should behave (resolve to 1.5);
> set-notation should never resolve to SNAPSHOTS.  We use set-notation as our
> primary dependency management technique for artifacts created inhouse.  We
> unbound the high end of the version to mean we want the latest released
> version.  If we want SNAPSHOTS to be included we manually change the version
> to state this.
>
> Depending on the opinion of the maven2 developers, another option that I
> think would also work well is to have another tag in the dependency section
> turning on/off inclusion of snapshots, i.e. <includeSnapshots>.

Sounds like a bug in those plugins, since the release plugin exhibits
the correct behaviour that you described - as per the design docs:

http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-Incorporating%7B%7BSNAPSHOT%7D%7Dversionsintothespecification

I'd suggest creating a minimal test project that reproduces the
problem and raise some JIRAs.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org