[
https://jira.codehaus.org/browse/MRELEASE-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MRELEASE-659.
-----------------------------------
Resolution: Duplicate
> snapshot dependency check on preparation of release: check artifacts WITH
> versions
> ----------------------------------------------------------------------------------
>
> Key: MRELEASE-659
> URL: https://jira.codehaus.org/browse/MRELEASE-659
> Project: Maven 2.x Release Plugin
> Issue Type: Bug
> Affects Versions: 2.0, 2.1
> Environment: maven 2.2.1, jdk1.6, release-plugin 2.1,
> preparationGoals="clean compile", goals="clean install", maven call: "clean
> dependency:resolve release:prepare release:perform"
> Reporter: Stephan Krull
>
> running a release on a project with the following dependency declaration:
> {noformat}
> <dependency>
> <groupId>abc</groupId>
> <artifactId>myartifact</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> </dependency>
> <dependency>
> <groupId>abc</groupId>
> <artifactId>myartifact</artifactId>
> <version>1.0.0</version>
> <type>test-jar</type>
> <scope>test</scope>
> </dependency>
> {noformat}
> we all would expect the plugin to fail the release because the dependency
> snapshot detection should find the SNAPSHOT artifact. with further checks i
> found that when using "dependency:resolve" no snapshot-artifact will be found
> in the checking phase. i did some more analysis and think that the cause is
> in
> "org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase.checkArtifact(Artifact,
> Map, Map, ReleaseDescriptor)". there the artifact to check is again
> initialized by getting it from the "ArtifactUtils.artifactMapByVersionlessId(
> project.getArtifacts() )"-Map. this map, unfortunately, doesn't keep both
> dependencies from above. so the check fails and the release plugin wrongly
> succeedes.
> i guess that there is more than this pain with dependency resolution. just
> want to let you know. as a workaround i just skip executing the
> "dependency:resolve" goal while releasing.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira