You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David Hoffer (JIRA)" <ji...@codehaus.org> on 2007/05/03 17:34:26 UTC

[jira] Commented: (MNG-2488) Version range does not select latest version present in local repository unless used in offline mode

    [ http://jira.codehaus.org/browse/MNG-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94950 ] 

David Hoffer commented on MNG-2488:
-----------------------------------

Unbounded high end version ranges should not resolve to SNAPSHOTS.  In your case version 1.0.0 should be the highest version resolved to regardless of repo location.

This document:
http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges
addressed the requirements for version ranges and stated that "Resolution of dependency ranges should not resolve to a snapshot (development version) unless it is included as an explicit boundary". I think this requirement was forgotten when version ranges were implemented.

> Version range does not select latest version present in local repository unless used in offline mode 
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2488
>                 URL: http://jira.codehaus.org/browse/MNG-2488
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Linux 2.6.8-1-686-smp #1 SMP Thu Nov 25 04:55:00 UTC 2004 i686 GNU/Linux
>            Reporter: Stefan Seidel
>
> When a version range for a dependency ist specified, M2 look in the given remote repositories only and ignores a newer version in the local repository.
> For example, I use the release plugin to release version 1.0.0 of artifact A (and deploy it to a remote repository), then move on locally to 1.0.1-SNAPSHOT. I continue developing this and do a "mvn install" because I do not necessarily want to deploy a snapshot immediately. If I then build a project B with
>   <dependency>
>     <groupId>mygroup</groupId>
>     <artifactId>A</artifactId>
>     <version>[1.0.0,)</version>
>   </dependency>
> Maven will look in the remote repository and find version 1.0.0, but will ignore my locally installed 1.0.1-SNAPSHOT. However, when using offline mode ("mvn -o package"), 1.0.1-SNAPSHOT is used.
> Workarounds include using offline mode - thus excluding the possibility to retrieve changes in other dependencies, using a fixed version (not very helpful) or deploying each and every snapshot (not helpful because other developers do not need to see snapshots that I use for testing only).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira