You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2015/04/04 16:29:40 UTC
svn commit: r1671270 - in /maven/release/trunk:
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/
maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/
maven-release-plugin/src/it/projects/update-versions/MRELEASE-...
Author: rfscholte
Date: Sat Apr 4 14:29:39 2015
New Revision: 1671270
URL: http://svn.apache.org/r1671270
Log:
[MRELEASE-555] update versions does not update intermodule dependencies
Added:
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-a/
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-a/pom.xml
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-b/
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-b/pom.xml
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/pom.xml
maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/verify.groovy
Modified:
maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java
maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java
Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java?rev=1671270&r1=1671269&r2=1671270&view=diff
==============================================================================
--- maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java (original)
+++ maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java Sat Apr 4 14:29:39 2015
@@ -54,12 +54,11 @@ public class RewritePomVersionsPhase
return false;
}
- @SuppressWarnings( "unchecked" )
@Override
protected Map<String, String> getOriginalVersionMap( ReleaseDescriptor releaseDescriptor,
List<MavenProject> reactorProjects, boolean simulate )
{
- return releaseDescriptor.getReleaseVersions();
+ return releaseDescriptor.getOriginalVersions( reactorProjects );
}
@SuppressWarnings( "unchecked" )
Added: maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-a/pom.xml?rev=1671270&view=auto
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-a/pom.xml (added)
+++ maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-a/pom.xml Sat Apr 4 14:29:39 2015
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.plugin.release.its</groupId>
+ <artifactId>mrelease-555</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module-a</artifactId>
+</project>
Added: maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-b/pom.xml?rev=1671270&view=auto
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-b/pom.xml (added)
+++ maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/module-b/pom.xml Sat Apr 4 14:29:39 2015
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.plugin.release.its</groupId>
+ <artifactId>mrelease-555</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>module-b</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugin.release.its</groupId>
+ <artifactId>module-a</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Added: maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/pom.xml?rev=1671270&view=auto
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/pom.xml (added)
+++ maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/pom.xml Sat Apr 4 14:29:39 2015
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugin.release.its</groupId>
+ <artifactId>mrelease-555</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+
+ <url>http://jira.codehaus.org/browse/MRELEASE-555</url>
+
+ <modules>
+ <module>module-a</module>
+ <module>module-b</module>
+ </modules>
+</project>
Added: maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/verify.groovy
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/verify.groovy?rev=1671270&view=auto
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/verify.groovy (added)
+++ maven/release/trunk/maven-release-plugin/src/it/projects/update-versions/MRELEASE-555/verify.groovy Sat Apr 4 14:29:39 2015
@@ -0,0 +1,28 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
+
+def projectRoot = new XmlSlurper().parse( new File( basedir, "module-b/pom.xml" ) )
+
+assert projectRoot.dependencies.dependency.version.text() == "1.1-SNAPSHOT"
+
+return true
\ No newline at end of file
Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java?rev=1671270&r1=1671269&r2=1671270&view=diff
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java (original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java Sat Apr 4 14:29:39 2015
@@ -74,6 +74,14 @@ public class UpdateVersionsMojo
private String developmentVersion;
/**
+ * Whether to update dependencies version to the next development version.
+ *
+ * @since 2.5.2
+ */
+ @Parameter( defaultValue = "true", property = "updateDependencies" )
+ private boolean updateDependencies;
+
+ /**
* {@inheritDoc}
*/
public void execute()
@@ -83,6 +91,7 @@ public class UpdateVersionsMojo
config.setAddSchema( addSchema );
config.setAutoVersionSubmodules( autoVersionSubmodules );
config.setDefaultDevelopmentVersion( developmentVersion );
+ config.setUpdateDependencies( updateDependencies );
Map<String, Scm> originalScmInfo = new HashMap<String, Scm>();
originalScmInfo.put( ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ),