[ http://jira.codehaus.org/browse/MRELEASE-91?page=all ] Marcel Schutte reopened MRELEASE-91: ------------------------------------
Testing with mvn 2.0.4 and the 2.0-beta-4 version of release-plugin shows that this issue is not yet fixed. Import the projects in the attached zip into your SCM, update the scm url in the pom and run mvn release:prepare. The following is the actual result in the parent.pom: <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/maven-v4_0_0.xsd"> . . <dependencyManagement> <dependencies> . . <dependency> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <version>1.0</version> </dependency> </dependencies> </dependencyManagement> . . </project> the expected result is: <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/maven-v4_0_0.xsd"> . . <dependencyManagement> <dependencies> . . <dependency> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <version>1.1-SNAPSHOT</version> </dependency> </dependencies> </dependencyManagement> . . </project> because com.mycompany.app:my-app is part of the reactor build. > Updating of dependencyManagement inconsistent with updating of dependencies > with regard to SNAPSHOTs > ---------------------------------------------------------------------------------------------------- > > Key: MRELEASE-91 > URL: http://jira.codehaus.org/browse/MRELEASE-91 > Project: Maven 2.x Release Plugin > Type: Bug > Versions: 2.0-beta-4 > Environment: maven 2.0.4, win XP > Reporter: Marcel Schutte > Assignee: Brett Porter > Fix For: 2.0-beta-4 > Attachments: depmgnt.zip, release.patch > > > The mechanism in release:prepare for creating the new development version of > POM's handles snapshots that are part of the current reactor build > differently for dependencyManagement and for dependencies. > A snapshot version in a dependencies section will be updated to the next > development version whereas one in dependencyManagement won't. > The attached patch will change this behavior. It will update a snapshot > version under dependencyManagement if and only if it is part of the current > reactor build. > Note that dependencies cannot contain snapshot versions that are not part of > the current reactor, but dependencyManagement can. I suggest to forbid this > too. > A second suggestion is to introduce a parameter to control the updating of > snapshot dependencies in both dependencyManagement and dependencies sections. > Either leave them at the released version or update them to the new > development version. This touches on the discussion in MRELEASE-36 about the > developer having to knowingly choose to use a new development version. I > would be fine with using a parameter to select the behavior as obtained with > my patch. My central point is that dependencyManagement and dependencies > snapshots should behave the same. -- 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