Skip to content

Commit

Permalink
[MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3
Browse files Browse the repository at this point in the history
Added MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest
  • Loading branch information
khmarbaise committed Oct 20, 2015
1 parent 1894d15 commit 5f9ac97
Show file tree
Hide file tree
Showing 13 changed files with 287 additions and 0 deletions.
Expand Up @@ -106,6 +106,7 @@ public static Test suite()
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137

suite.addTestSuite( MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.class );
suite.addTestSuite( MavenITmng5805PkgTypeMojoConfiguration.class );
suite.addTestSuite( MavenITmng5783PluginDependencyFiltering.class );
suite.addTestSuite( MavenITmng5774ConfigurationProcessorsTest.class );
Expand Down
@@ -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();
}

}
47 changes: 47 additions & 0 deletions 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>
37 changes: 37 additions & 0 deletions 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>
Empty file.
41 changes: 41 additions & 0 deletions 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>
36 changes: 36 additions & 0 deletions 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>
12 changes: 12 additions & 0 deletions 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>
16 changes: 16 additions & 0 deletions 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>
17 changes: 17 additions & 0 deletions 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>

19 changes: 19 additions & 0 deletions 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>
Empty file.
@@ -0,0 +1,5 @@
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>

0 comments on commit 5f9ac97

Please sign in to comment.