mirror of
https://github.com/apache/maven.git
synced 2025-02-22 18:04:52 +00:00
o Decoupled it0080 from production plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@709770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b5e6e0fa16
commit
af0f99a5d6
@ -23,32 +23,31 @@
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
public class MavenIT0080Test
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that depending on a WAR doesn't also get its dependencies
|
||||
* transitively.
|
||||
* Test that depending on a WAR doesn't also get its dependencies transitively.
|
||||
*/
|
||||
public void testit0080()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0080" );
|
||||
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "test-component-a/target/test-component-a-0.1.jar" );
|
||||
verifier.assertFilePresent( "test-component-b/target/test-component-b-0.1.war" );
|
||||
verifier.assertFilePresent(
|
||||
"test-component-b/target/test-component-b-0.1.war!/WEB-INF/lib/test-component-a-0.1.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.ear" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.ear!/test-component-b-0.1.war" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/test-component-b-0.1.war" );
|
||||
verifier.assertFileNotPresent( "test-component-c/target/test-component-c-0.1/test-component-a-0.1.jar" );
|
||||
verifier.setAutoclean( false );
|
||||
verifier.deleteDirectory( "target" );
|
||||
verifier.deleteArtifacts( "org.apache.maven.its.it0080" );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
Collection artifacts = verifier.loadLines( "target/artifacts.txt", "UTF-8" );
|
||||
assertEquals( Collections.singletonList( "org.apache.maven.its.it0080:war:war:0.1" ), artifacts );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,15 +1,78 @@
|
||||
<?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>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: it0080</name>
|
||||
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>maven-it-it0080</artifactId>
|
||||
<description>Test that depending on a WAR doesn't also get its dependencies
|
||||
transitively.</description>
|
||||
<artifactId>test</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>test-component-c</module>
|
||||
<module>test-component-b</module>
|
||||
<module>test-component-a</module>
|
||||
</modules>
|
||||
<packaging>ear</packaging>
|
||||
|
||||
<name>Maven Integration Test :: it0080</name>
|
||||
<description>
|
||||
Test that depending on a WAR doesn't also get its dependencies transitively.
|
||||
</description>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>maven-core-it</id>
|
||||
<url>file:///${basedir}/repo</url>
|
||||
<releases>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>war</artifactId>
|
||||
<version>0.1</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<configuration>
|
||||
<projectArtifacts>target/artifacts.txt</projectArtifacts>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
Binary file not shown.
@ -0,0 +1,55 @@
|
||||
<?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>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>jar</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-core-it</id>
|
||||
<url>file:///${basedir}/repo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>.</directory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>jar</artifactId>
|
||||
<version>0.1</version>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>0.1</version>
|
||||
</versions>
|
||||
<lastUpdated>20081101185851</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
@ -0,0 +1,64 @@
|
||||
<?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>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>war</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-core-it</id>
|
||||
<url>file:///${basedir}/repo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>jar</artifactId>
|
||||
<version>0.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>.</directory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<artifactId>war</artifactId>
|
||||
<version>0.1</version>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>0.1</version>
|
||||
</versions>
|
||||
<lastUpdated>20081101191108</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
@ -1,12 +0,0 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-it-it0080</artifactId>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
<artifactId>test-component-a</artifactId>
|
||||
<version>0.1</version>
|
||||
<name>Test Component A</name>
|
||||
<packaging>jar</packaging>
|
||||
</project>
|
@ -1,5 +0,0 @@
|
||||
package it0080;
|
||||
|
||||
public class A {
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-it-it0080</artifactId>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
<artifactId>test-component-b</artifactId>
|
||||
<version>0.1</version>
|
||||
<name>Test Component B</name>
|
||||
<packaging>war</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>test-component-a</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,7 +0,0 @@
|
||||
package it0080;
|
||||
|
||||
public class B
|
||||
extends A
|
||||
{
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app >
|
||||
</web-app>
|
@ -1,20 +0,0 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-it-it0080</artifactId>
|
||||
<groupId>org.apache.maven.its.it0080</groupId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
<artifactId>test-component-c</artifactId>
|
||||
<version>0.1</version>
|
||||
<name>Test Component C</name>
|
||||
<packaging>ear</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>test-component-b</artifactId>
|
||||
<version>0.1</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,7 +0,0 @@
|
||||
package it0080;
|
||||
|
||||
public class C
|
||||
extends A
|
||||
{
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user