[
https://jira.codehaus.org/browse/MRELEASE-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=352801#comment-352801
]
Robert Scholte commented on MRELEASE-870:
-----------------------------------------
I've added the following (aggregator-)pom next to the 4 folders
{code:xml|title=pom.xml}
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.tolina.test</groupId>
<artifactId>maven-release-bug-aggregator</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>maven-release-bug-dependency</module>
<module>maven-release-bug-dependency2</module>
<module>maven-release-bug-parent</module>
<module>maven-release-bug-project</module>
</modules>
</project>
{code}
And I've added a relativePath to all parent like
{code:xml}
<project>
<parent>
<groupId>de.tolina.test</groupId>
<artifactId>maven-release-bug-parent</artifactId>
<version>1.0.0</version>
<relativePath>../maven-release-bug-parent</relativePath>
</parent>
...
</project>
{code}
If I execute {{mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:tree}}
the build fails with the following exception:
{noformat}
[ERROR] Failed to execute goal on project maven-release-bug-dependency2:
Could not resolve dependencies for project
de.tolina.test:maven-release-bug-dependency2:jar:0.0.1:
Could not find artifact de.tolina.test:maven-release-bug-dependency:jar:0.0.1
in nexus-local (http://localhost:8081/nexus/content/groups/public) ->
[Help 1]
{noformat}
I thought you weren't talking about a transitive dependency, but now I see you
are. But I do think that the result above is the expected behavior.
> Snapshot dependency check does not consider transitive dependencies
> -------------------------------------------------------------------
>
> Key: MRELEASE-870
> URL: https://jira.codehaus.org/browse/MRELEASE-870
> Project: Maven Release Plugin
> Issue Type: Bug
> Components: prepare
> Affects Versions: 2.4.2
> Environment: Maven 3.0.3
> Java 1.6
> Reporter: Frank Jakop
> Assignee: Robert Scholte
> Priority: Blocker
> Attachments: maven-release-bug.zip
>
>
> With maven-release-plugin 2.4.2 we are encountering an issue which has a very
> big impact on our production deployment infrastructure.
> In our latest released artifact's poms we were surprised to see snapshot
> versions, which is by default prohibited by maven release plugin.
> We tracked the issue down and noticed a difference between "normal" maven
> dependency resolution (e.g. dependency:tree) and the one produced by
> maven-release-plugin.
> I attached a sample project suite which very easy reproduces the problem.
> Please look into the README in the maven-release-bug-parent project. The
> steps to reproduce include the local installation of some artifacts,
> partially in different versions.
> The outcome of the project is a clearly error-free run release:prepare but
> with the following dependency tree:
> {noformat}
> D:\maven-release-bug-project>mvn dependency:tree
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building maven-release-bug-project 0.0.1-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @
> maven-release-bug-project ---
> [INFO] de.tolina.test:maven-release-bug-project:jar:0.0.1-SNAPSHOT
> [INFO] \- de.tolina.test:maven-release-bug-dependency2:jar:0.0.1:compile
> [INFO] \-
> de.tolina.test:maven-release-bug-dependency:jar:*0.0.2-SNAPSHOT*:compile
> (version managed from 0.0.1)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)