You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/01/08 22:48:56 UTC

[GitHub] rfscholte closed pull request #27: [MRELEASE-161] If there is more than one artifact with the same artifactId in dependencyManagement only the first one is updated

rfscholte closed pull request #27: [MRELEASE-161] If there is more than one artifact with the same artifactId in dependencyManagement only the first one is updated
URL: https://github.com/apache/maven-release/pull/27
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/pom.xml
new file mode 100644
index 00000000..0cffe8ef
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/pom.xml
@@ -0,0 +1,87 @@
+<?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-161</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <description>This is the base POM the release test modules</description>
+  <packaging>pom</packaging>
+  <name>O2 Release test Base Module</name>
+  <modules>
+    <module>release-test-module-one</module>
+    <module>release-test-module-two</module>
+  </modules>
+  <scm>
+    <connection>scm:git|sd_pa/tools/release-test</connection>
+  </scm>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.maven.plugin.release.its</groupId>
+        <artifactId>release-test-module-one</artifactId>
+        <version>1.0-SNAPSHOT</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.apache.maven.plugin.release.its</groupId>
+        <artifactId>release-test-module-one</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <distributionManagement>
+    <repository>
+      <id>o2-webdav</id>
+      <url>${repository.o2.webdav}</url>
+    </repository>
+    <snapshotRepository>
+      <id>o2-webdav</id>
+      <url>${repository.o2.webdav}</url>
+    </snapshotRepository>
+    <site>
+      <url>
+        dav:${o2.module.sites.rootUrl}/${project.groupId}/${project.artifactId}-${project.version}</url>
+    </site>
+  </distributionManagement>
+</project>
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/release-test-module-one/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/release-test-module-one/pom.xml
new file mode 100644
index 00000000..aac08703
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/release-test-module-one/pom.xml
@@ -0,0 +1,49 @@
+<?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">
+  <parent>
+    <groupId>org.apache.maven.plugin.release.its</groupId>
+    <artifactId>mrelease-161</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>release-test-module-one</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>release-test-module-one</name>
+  <url>http://maven.apache.org</url>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>   
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/release-test-module-two/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/release-test-module-two/pom.xml
new file mode 100644
index 00000000..0e494b92
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/release-test-module-two/pom.xml
@@ -0,0 +1,47 @@
+<?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">
+  <parent>
+    <groupId>org.apache.maven.plugin.release.its</groupId>
+    <artifactId>mrelease-161</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>release-test-module-two</artifactId>
+  <name>release-test-module-two</name>
+  <version>1.0-SNAPSHOT</version>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    
+    <dependency>
+      <groupId>org.apache.maven.plugin.release.its</groupId>
+      <artifactId>release-test-module-one</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.maven.plugin.release.its</groupId>
+      <artifactId>release-test-module-one</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/verify.groovy b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/verify.groovy
new file mode 100644
index 00000000..ec407136
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161-dependencyManagement/verify.groovy
@@ -0,0 +1,29 @@
+
+/*
+ * 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, "pom.xml.next" ) )
+
+assert projectRoot.dependencyManagement.dependencies.dependency[0].version.text() == "1.1-SNAPSHOT"
+assert projectRoot.dependencyManagement.dependencies.dependency[1].version.text() == "1.1-SNAPSHOT"
+
+return true
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/pom.xml
new file mode 100644
index 00000000..07400a47
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/pom.xml
@@ -0,0 +1,68 @@
+<?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-161</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <description>This is the base POM the release test modules</description>
+  <packaging>pom</packaging>
+  <name>O2 Release test Base Module</name>
+  <modules>
+    <module>release-test-module-one</module>
+    <module>release-test-module-two</module>
+  </modules>
+  <scm>
+    <connection>scm:git|sd_pa/tools/release-test</connection>
+  </scm>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <distributionManagement>
+    <repository>
+      <id>o2-webdav</id>
+      <url>${repository.o2.webdav}</url>
+    </repository>
+    <snapshotRepository>
+      <id>o2-webdav</id>
+      <url>${repository.o2.webdav}</url>
+    </snapshotRepository>
+    <site>
+      <url>
+        dav:${o2.module.sites.rootUrl}/${project.groupId}/${project.artifactId}-${project.version}</url>
+    </site>
+  </distributionManagement>
+</project>
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/release-test-module-one/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/release-test-module-one/pom.xml
new file mode 100644
index 00000000..aac08703
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/release-test-module-one/pom.xml
@@ -0,0 +1,49 @@
+<?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">
+  <parent>
+    <groupId>org.apache.maven.plugin.release.its</groupId>
+    <artifactId>mrelease-161</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>release-test-module-one</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>release-test-module-one</name>
+  <url>http://maven.apache.org</url>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>   
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/release-test-module-two/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/release-test-module-two/pom.xml
new file mode 100644
index 00000000..0a2ed5fd
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/release-test-module-two/pom.xml
@@ -0,0 +1,49 @@
+<?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">
+  <parent>
+    <groupId>org.apache.maven.plugin.release.its</groupId>
+    <artifactId>mrelease-161</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>release-test-module-two</artifactId>
+  <name>release-test-module-two</name>
+  <version>1.0-SNAPSHOT</version>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    
+    <dependency>
+      <groupId>org.apache.maven.plugin.release.its</groupId>
+      <artifactId>release-test-module-one</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.maven.plugin.release.its</groupId>
+      <artifactId>release-test-module-one</artifactId>
+      <version>1.0-SNAPSHOT</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/verify.groovy b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/verify.groovy
new file mode 100644
index 00000000..3718c548
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-161/verify.groovy
@@ -0,0 +1,29 @@
+
+/*
+ * 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, "release-test-module-two/pom.xml.next" ) )
+
+assert projectRoot.dependencies.dependency[0].version.text() == "1.1-SNAPSHOT"
+assert projectRoot.dependencies.dependency[1].version.text() == "1.1-SNAPSHOT"
+
+return true
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services