You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2022/05/25 06:05:22 UTC
[maven-release] 01/02: [MRELEASE-1079] new integration test
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MRELEASE-1093
in repository https://gitbox.apache.org/repos/asf/maven-release.git
commit a58a062289bb383b112d01a8cb838cb49d116ac7
Author: mac <de...@markusschaefer-online.de>
AuthorDate: Wed Mar 2 13:56:52 2022 +0100
[MRELEASE-1079] new integration test
---
.../MRELEASE-1053-bug/module-a/module-b/pom.xml | 37 ++++++++++++++
.../apache/maven/plugin/release/module/a/App.java | 32 ++++++++++++
.../maven/plugin/release/module/a/AppTest.java | 57 ++++++++++++++++++++++
.../prepare/MRELEASE-1053-bug/module-a/pom.xml | 33 +++++++++++++
.../it/projects/prepare/MRELEASE-1053-bug/pom.xml | 51 +++++++++++++++++++
.../prepare/MRELEASE-1053-bug/verify.groovy | 26 ++++++++++
6 files changed, 236 insertions(+)
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/pom.xml
new file mode 100644
index 00000000..97776618
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/pom.xml
@@ -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 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>
+ <parent>
+ <groupId>org.apache.maven.plugin.release</groupId>
+ <artifactId>module-a</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.maven.plugin.release</groupId>
+ <artifactId>module-b</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/src/main/java/org/apache/maven/plugin/release/module/a/App.java b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/src/main/java/org/apache/maven/plugin/release/module/a/App.java
new file mode 100644
index 00000000..05ca6eca
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/src/main/java/org/apache/maven/plugin/release/module/a/App.java
@@ -0,0 +1,32 @@
+package org.apache.maven.plugin.release.module.a;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/src/test/java/org/apache/maven/plugin/release/module/a/AppTest.java b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/src/test/java/org/apache/maven/plugin/release/module/a/AppTest.java
new file mode 100644
index 00000000..ca41b5f5
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/module-b/src/test/java/org/apache/maven/plugin/release/module/a/AppTest.java
@@ -0,0 +1,57 @@
+package org.apache.maven.plugin.release.module.a;
+
+/*
+ * 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.
+ */
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/pom.xml
new file mode 100644
index 00000000..f5b00fca
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/module-a/pom.xml
@@ -0,0 +1,33 @@
+<?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 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>
+ <parent>
+ <groupId>org.apache.maven.plugin.release</groupId>
+ <artifactId>mrelease-1053-bug</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.maven.plugin.release</groupId>
+ <artifactId>module-a</artifactId>
+ <packaging>pom</packaging>
+ <modules>
+ <module>module-b</module>
+ </modules>
+</project>
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/pom.xml
new file mode 100644
index 00000000..92f6be33
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/pom.xml
@@ -0,0 +1,51 @@
+<?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</groupId>
+ <artifactId>mrelease-1053-bug</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <url>https://issues.apache.org/jira/browse/MRELEASE-1053</url>
+ <modules>
+ <module>module-a</module>
+ </modules>
+
+ <scm>
+ <connection>scm:git|sd_pa/tools/release-test</connection>
+ </scm>
+
+ <properties>
+ <maven.compiler.source>@maven.compiler.source@</maven.compiler.source>
+ <maven.compiler.target>@maven.compiler.target@</maven.compiler.target>
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/verify.groovy b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/verify.groovy
new file mode 100644
index 00000000..262a71d0
--- /dev/null
+++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-1053-bug/verify.groovy
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+// check module-a project
+project = new XmlSlurper().parse( new File( new File ( basedir, 'module-a' ), 'pom.xml.tag' ) )
+assert 0 == project.scm.size() // scm element must not exist in module
+
+// check module-b project
+project = new XmlSlurper().parse( new File( new File (new File ( basedir, 'module-a' ), 'module-b'), 'pom.xml.tag' ) )
+assert 0 == project.scm.size() // scm element must not exist in module
\ No newline at end of file