You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2015/10/21 00:25:19 UTC

maven-integration-testing git commit: [MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3 Added MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest

Repository: maven-integration-testing
Updated Branches:
  refs/heads/master 1894d15cd -> 5f9ac97ac


[MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3
Added MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest


Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/5f9ac97a
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/5f9ac97a
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/5f9ac97a

Branch: refs/heads/master
Commit: 5f9ac97acdce654745db22001e88be2fce739e25
Parents: 1894d15
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Tue Oct 20 22:52:18 2015 +0200
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Wed Oct 21 00:09:11 2015 +0200

----------------------------------------------------------------------
 .../apache/maven/it/IntegrationTestSuite.java   |  1 +
 ...MultimoduleWithEARFailsToResolveWARTest.java | 56 ++++++++++++++++++++
 .../src/test/resources/mng-5898/ear/pom.xml     | 47 ++++++++++++++++
 .../src/test/resources/mng-5898/ejbs/pom.xml    | 37 +++++++++++++
 .../src/main/resources/META-INF/ejb-jar.xml     |  0
 .../src/test/resources/mng-5898/pom.xml         | 41 ++++++++++++++
 .../resources/mng-5898/primary-source/pom.xml   | 36 +++++++++++++
 .../resources/mng-5898/projects/logging/pom.xml | 12 +++++
 .../test/resources/mng-5898/projects/pom.xml    | 16 ++++++
 .../test/resources/mng-5898/servlets/pom.xml    | 17 ++++++
 .../resources/mng-5898/servlets/servlet/pom.xml | 19 +++++++
 .../servlet/src/main/webapp/WEB-INF/web.xml     |  0
 .../servlets/servlet/src/main/webapp/index.jsp  |  5 ++
 13 files changed, 287 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 662b30b..5b0458d 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
         // -------------------------------------------------------------------------------------------------------------
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.class );
         suite.addTestSuite( MavenITmng5805PkgTypeMojoConfiguration.class );
         suite.addTestSuite( MavenITmng5783PluginDependencyFiltering.class );
         suite.addTestSuite( MavenITmng5774ConfigurationProcessorsTest.class );

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.java
new file mode 100644
index 0000000..4298e81
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.java
@@ -0,0 +1,56 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-5898">MNG-5898</a>.
+ * 
+ * @author Karl Heinz Marbaise
+ */
+public class MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest()
+    {
+        super( "[3.1,)" );
+    }
+
+    /**
+     * 
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5898" );
+
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/ear/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/ear/pom.xml b/core-it-suite/src/test/resources/mng-5898/ear/pom.xml
new file mode 100644
index 0000000..fd0b19a
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/ear/pom.xml
@@ -0,0 +1,47 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project</groupId>
+   <artifactId>ear</artifactId>
+   <packaging>ear</packaging>
+   <version>1.0</version>
+   <name>ear assembly</name>
+   <parent>
+      <groupId>root</groupId>
+      <artifactId>project</artifactId>
+      <version>1.0</version>
+   </parent>
+   <dependencies>
+      <dependency>
+         <groupId>root.project</groupId>
+         <artifactId>ejbs</artifactId>
+         <type>ejb</type>
+      </dependency>
+      <dependency>
+         <groupId>root.project.servlets</groupId>
+         <artifactId>servlet</artifactId>
+         <type>war</type>
+      </dependency>
+      <dependency>
+         <groupId>root.project</groupId>
+         <artifactId>primary-source</artifactId>
+      </dependency>
+      <dependency>
+         <groupId>root.project.projects</groupId>
+         <artifactId>logging</artifactId>
+      </dependency>
+   </dependencies>
+   <build>
+      <plugins>
+         <plugin>
+            <artifactId>maven-ear-plugin</artifactId>
+            <configuration>
+               <archive>
+                  <manifest>
+                     <addClasspath>true</addClasspath>
+                  </manifest>
+               </archive>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/ejbs/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/ejbs/pom.xml b/core-it-suite/src/test/resources/mng-5898/ejbs/pom.xml
new file mode 100644
index 0000000..d7823fe
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/ejbs/pom.xml
@@ -0,0 +1,37 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project</groupId>
+   <artifactId>ejbs</artifactId>
+   <packaging>ejb</packaging>
+   <version>1.0</version>
+   <name>enterprise java beans</name>
+   <parent>
+      <groupId>root</groupId>
+      <artifactId>project</artifactId>
+      <version>1.0</version>
+   </parent>
+   <dependencies>
+      <dependency>
+         <groupId>root.project</groupId>
+         <artifactId>primary-source</artifactId>
+      </dependency>
+      <dependency>
+         <groupId>root.project.projects</groupId>
+         <artifactId>logging</artifactId>
+      </dependency>
+  </dependencies>
+   <build>
+      <plugins>
+         <plugin>
+            <artifactId>maven-ejb-plugin</artifactId>
+            <configuration>
+               <archive>
+                  <manifest>
+                     <addClasspath>true</addClasspath>
+                  </manifest>
+               </archive> 
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/ejbs/src/main/resources/META-INF/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/ejbs/src/main/resources/META-INF/ejb-jar.xml b/core-it-suite/src/test/resources/mng-5898/ejbs/src/main/resources/META-INF/ejb-jar.xml
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/pom.xml b/core-it-suite/src/test/resources/mng-5898/pom.xml
new file mode 100644
index 0000000..3014633
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/pom.xml
@@ -0,0 +1,41 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root</groupId>
+   <version>1.0</version>
+   <artifactId>project</artifactId>
+   <packaging>pom</packaging>
+   <name>project</name>
+   <modules>
+      <module>projects</module>
+      <module>primary-source</module>
+      <module>servlets</module>
+      <module>ejbs</module>
+      <module>ear</module>
+   </modules>
+   <dependencyManagement>
+      <dependencies>
+         <dependency>
+            <groupId>root.project.projects</groupId>
+            <artifactId>logging</artifactId>
+            <version>1.0</version>
+         </dependency>
+         <dependency>
+            <groupId>root.project</groupId>
+            <artifactId>primary-source</artifactId>
+            <version>1.0</version>
+         </dependency>
+         <dependency>
+            <groupId>root.project.servlets</groupId>
+            <artifactId>servlet</artifactId>
+            <version>1.0</version>
+            <type>war</type>
+         </dependency>
+         <dependency>
+            <groupId>root.project</groupId>
+            <artifactId>ejbs</artifactId>
+            <version>1.0</version>
+            <type>ejb</type>
+         </dependency>
+      </dependencies>
+   </dependencyManagement>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/primary-source/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/primary-source/pom.xml b/core-it-suite/src/test/resources/mng-5898/primary-source/pom.xml
new file mode 100644
index 0000000..0c1b6f9
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/primary-source/pom.xml
@@ -0,0 +1,36 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project</groupId>
+   <artifactId>primary-source</artifactId>
+   <packaging>jar</packaging>
+   <name>core project classes</name>
+   <parent>
+      <groupId>root</groupId>
+      <artifactId>project</artifactId>
+      <version>1.0</version>
+   </parent>
+   <dependencies>
+      <dependency>
+         <groupId>root.project.projects</groupId>
+         <artifactId>logging</artifactId>
+      </dependency>                  
+   </dependencies>
+   <build>
+      <plugins>
+         <plugin>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+               <encoding>iso-8859-1</encoding>
+            </configuration>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <configuration>
+               <minmemory>128m</minmemory>
+               <maxmemory>512m</maxmemory>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/projects/logging/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/projects/logging/pom.xml b/core-it-suite/src/test/resources/mng-5898/projects/logging/pom.xml
new file mode 100644
index 0000000..c9acab5
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/projects/logging/pom.xml
@@ -0,0 +1,12 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project.projects</groupId>
+   <artifactId>logging</artifactId>
+   <packaging>jar</packaging>
+   <name>logging</name>
+   <parent>
+      <groupId>root.project</groupId>
+      <artifactId>projects</artifactId>
+      <version>1.0</version>
+   </parent>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/projects/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/projects/pom.xml b/core-it-suite/src/test/resources/mng-5898/projects/pom.xml
new file mode 100644
index 0000000..425b41b
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/projects/pom.xml
@@ -0,0 +1,16 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project</groupId>
+   <version>1.0</version>
+   <artifactId>projects</artifactId>
+   <packaging>pom</packaging>
+   <name>sub projects</name>
+   <parent>
+      <groupId>root</groupId>
+      <artifactId>project</artifactId>
+      <version>1.0</version>
+   </parent>
+   <modules>
+      <module>logging</module>
+   </modules>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/servlets/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/servlets/pom.xml b/core-it-suite/src/test/resources/mng-5898/servlets/pom.xml
new file mode 100644
index 0000000..26787f8
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/servlets/pom.xml
@@ -0,0 +1,17 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project</groupId>
+   <artifactId>servlets</artifactId>
+   <packaging>pom</packaging>
+   <name>servlets</name>
+   <version>1.0</version>
+   <parent>
+      <groupId>root</groupId>
+      <artifactId>project</artifactId>
+      <version>1.0</version>
+   </parent>
+   <modules>
+      <module>servlet</module>
+   </modules>
+</project>
+

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/servlets/servlet/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/servlets/servlet/pom.xml b/core-it-suite/src/test/resources/mng-5898/servlets/servlet/pom.xml
new file mode 100644
index 0000000..94cd643
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/servlets/servlet/pom.xml
@@ -0,0 +1,19 @@
+<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>root.project.servlets</groupId>
+   <artifactId>servlet</artifactId>
+   <packaging>war</packaging>
+   <name>servlet</name>
+   <parent>
+      <groupId>root.project</groupId>
+      <artifactId>servlets</artifactId>
+      <version>1.0</version>
+   </parent>
+   <dependencies>
+      <dependency>
+         <groupId>root.project</groupId>
+         <artifactId>primary-source</artifactId>
+         <scope>provided</scope>
+      </dependency>
+   </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/WEB-INF/web.xml b/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/5f9ac97a/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/index.jsp b/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/index.jsp
new file mode 100644
index 0000000..6f07b72
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5898/servlets/servlet/src/main/webapp/index.jsp
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>