You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kees van Dieren (JIRA)" <ji...@codehaus.org> on 2008/10/21 13:23:19 UTC

[jira] Commented: (MNG-2525) SNAPSHOT dependencies aren't found when repository has 'release' disabled and a version range is used

    [ http://jira.codehaus.org/browse/MNG-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=151464#action_151464 ] 

Kees van Dieren commented on MNG-2525:
--------------------------------------

Ranges should not lead to snapshot dependencies, unless a snapshot is explicit specified in the version range.
See: http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
Quote: "Resolution of dependency ranges should not resolve to a snapshot (development version) unless it is included as an explicit boundary"

> SNAPSHOT dependencies aren't found when repository has 'release' disabled and a version range is used
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2525
>                 URL: http://jira.codehaus.org/browse/MNG-2525
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Windows XP, Sun JDK 5.0 Update 7
>            Reporter: Nathan Beyer (Apache)
>            Priority: Critical
>             Fix For: Reviewed Pending Version Assignment
>
>
> When a repository is configured (POM, profiles, etc), 'releases' is disabled, 'snapshots' is enabled and a dependency uses a version range, the dependency fails to resolve. The dependency is found when an explicit version is used. The following can be used to recreate the issue.
> Setup the maven snapshot repository in an active profile like this:
>         <repository>
>           <id>apache.snapshots</id>
>           <name>Maven Snapshots</name>
>           <url>http://people.apache.org/maven-snapshot-repository</url>
>           <releases>
>             <enabled>false</enabled>
>           </releases>
>           <snapshots>
>             <enabled>true</enabled>
>           </snapshots>
>         </repository>
> Check out the maven-install-plugin at revision 427494 (or any revision or other plugin that has a dependency that's a SNAPSHOT). Run a build (mvn package) and all dependencies should download. Modify the dependency in the POM to use a version range, instead of an explict version. For example, change the version "1.0-SNAPSHOT" to "[0,1)", which includes the same version. Run another build (mvn package) and the dependency will fail to download.

-- 
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