[ 
http://jira.codehaus.org/browse/MNG-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MNG-4295.
----------------------------------

    Resolution: Duplicate
      Assignee: Benjamin Bentmann

Just to be clear: The attached example project will still not work due to the 
fix for MNG-3092.

> version ranges are not resolved from snapshot only repositories
> ---------------------------------------------------------------
>
>                 Key: MNG-4295
>                 URL: http://jira.codehaus.org/browse/MNG-4295
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.1.0-M1, 2.1.0, 
> 2.2.0, 2.2.1
>            Reporter: Stephen Connolly
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>         Attachments: mversions-19.tar.gz
>
>
> If a repository is defined like:
>   <repositories>
>     <repository>
>       <id>...</id>
>       <name>...</name>
>       <url>....</url>
>       <releases>
>         <enabled>false</enabled>
>       </releases>
>     </repository>
>   </repositories>
> Then the following call chain results with no versions being resolved from 
> this repository
> We ask the ArtifactMetadataSource to give us a list of available versions... 
> that is this method:
> http://maven.apache.org/ref/current/xref/org/apache/maven/project/artifact/MavenMetadataSource.html#495
> This method creates a RepositoryMetadata object of type:
> http://maven.apache.org/ref/current/xref/org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata.html#31
> This metadata object is passed to the RepositoryMetadataManager:
> http://maven.apache.org/ref/current/xref/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.html#58
> Which asks the RepositoryMetadata object if it is a snapshot...
> http://maven.apache.org/ref/current/xref/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.html#69
> but our metadata object can never be a snapshot:
> http://maven.apache.org/ref/current/xref/org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata.html#81
> So the end result is that we never look in non-release repositories...
> To verify, run the attached test case like so
> mvn clean verify -Dusernum=2 
> This will fail as the repository is disabled for releases, while
> mvn clean verify -Dusernum=3
> Will pass, the only change being that the remote repository is now enabled 
> for releases

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

        

Reply via email to