Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
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
-
None
-
None
Description
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:
This method creates a RepositoryMetadata object of type:
This metadata object is passed to the RepositoryMetadataManager:
Which asks the RepositoryMetadata object if it is a snapshot...
but our metadata object can never be a snapshot:
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