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