mirror of https://github.com/apache/maven.git
o Decoupled mng-0249 from production plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@735158 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b61e03a1d0
commit
b68956f74a
|
@ -23,6 +23,7 @@ import org.apache.maven.it.Verifier;
|
|||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-249">MNG-249</a>.
|
||||
|
@ -35,24 +36,33 @@ public class MavenITmng0249ResolveDepsFromReactorTest
|
|||
{
|
||||
|
||||
/**
|
||||
* Test that the reactor can establish the artifact location of known projects for dependencies
|
||||
* Test that the reactor can establish the artifact location of known projects for dependencies.
|
||||
*/
|
||||
public void testitMNG249()
|
||||
public void testitMNG0249()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0249" );
|
||||
|
||||
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.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.war" );
|
||||
verifier.assertFilePresent(
|
||||
"test-component-c/target/test-component-c-0.1.war!/WEB-INF/lib/test-component-a-0.1.jar" );
|
||||
verifier.assertFilePresent(
|
||||
"test-component-c/target/test-component-c-0.1.war!/WEB-INF/lib/test-component-b-0.1.jar" );
|
||||
verifier.setAutoclean( false );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
}
|
||||
}
|
||||
List ccp = verifier.loadLines( "test-component-c/target/compile.txt", "UTF-8" );
|
||||
assertTrue( ccp.toString(), ccp.contains( "test-component-c/classes" ) );
|
||||
assertTrue( ccp.toString(), ccp.contains( "test-component-b/classes" ) );
|
||||
assertTrue( ccp.toString(), ccp.contains( "test-component-a/classes" ) );
|
||||
|
||||
List rcp = verifier.loadLines( "test-component-c/target/runtime.txt", "UTF-8" );
|
||||
assertTrue( rcp.toString(), rcp.contains( "test-component-c/classes" ) );
|
||||
assertTrue( rcp.toString(), rcp.contains( "test-component-b/classes" ) );
|
||||
assertTrue( rcp.toString(), rcp.contains( "test-component-a/classes" ) );
|
||||
|
||||
List tcp = verifier.loadLines( "test-component-c/target/test.txt", "UTF-8" );
|
||||
assertTrue( tcp.toString(), tcp.contains( "test-component-c/classes" ) );
|
||||
assertTrue( tcp.toString(), tcp.contains( "test-component-b/classes" ) );
|
||||
assertTrue( tcp.toString(), tcp.contains( "test-component-a/classes" ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,35 @@
|
|||
<?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 :: it0042</name>
|
||||
<groupId>org.apache.maven.its.it0042</groupId>
|
||||
<artifactId>maven-it-it0042</artifactId>
|
||||
<description>Test that the reactor can establish the artifact location of known projects for dependencies</description>
|
||||
|
||||
<groupId>org.apache.maven.its.mng0249</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-249</name>
|
||||
<description>Test that the reactor can establish the artifact location of known projects for dependencies</description>
|
||||
|
||||
<modules>
|
||||
<module>test-component-c</module>
|
||||
<module>test-component-b</module>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
key = value
|
|
@ -1,12 +1,63 @@
|
|||
<?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>
|
||||
|
||||
<parent>
|
||||
<artifactId>maven-it-it0042</artifactId>
|
||||
<groupId>org.apache.maven.its.it0042</groupId>
|
||||
<groupId>org.apache.maven.its.mng0249</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-component-a</artifactId>
|
||||
<version>0.1</version>
|
||||
<name>Test Component A</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-249 :: Test Component A</name>
|
||||
|
||||
<build>
|
||||
<outputDirectory>classes</outputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-artifact</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--
|
||||
NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the
|
||||
project's artifact file.
|
||||
-->
|
||||
<id>compile</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<mainFile>classes</mainFile>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>set</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package it0042;
|
||||
|
||||
public class A {
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
key = value
|
|
@ -1,19 +1,71 @@
|
|||
<?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>
|
||||
|
||||
<parent>
|
||||
<artifactId>maven-it-it0042</artifactId>
|
||||
<groupId>org.apache.maven.its.it0042</groupId>
|
||||
<groupId>org.apache.maven.its.mng0249</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-component-b</artifactId>
|
||||
<version>0.1</version>
|
||||
<name>Test Component B</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-249 :: Test Component B</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.it0042</groupId>
|
||||
<groupId>org.apache.maven.its.mng0249</groupId>
|
||||
<artifactId>test-component-a</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<outputDirectory>classes</outputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-artifact</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--
|
||||
NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the
|
||||
project's artifact file.
|
||||
-->
|
||||
<id>compile</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<mainFile>classes</mainFile>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>set</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package it0042;
|
||||
|
||||
public class B
|
||||
extends A
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
key = value
|
|
@ -1,20 +1,94 @@
|
|||
<?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>
|
||||
|
||||
<parent>
|
||||
<artifactId>maven-it-it0042</artifactId>
|
||||
<groupId>org.apache.maven.its.it0042</groupId>
|
||||
<groupId>org.apache.maven.its.mng0249</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-component-c</artifactId>
|
||||
<version>0.1</version>
|
||||
<name>Test Component C</name>
|
||||
<packaging>war</packaging>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-249 :: Test Component C</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.it0042</groupId>
|
||||
<!-- NOTE: This does not only require to resolve the classes/JARs but also the POM to get its dependencies -->
|
||||
<groupId>org.apache.maven.its.mng0249</groupId>
|
||||
<artifactId>test-component-b</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<outputDirectory>classes</outputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-artifact</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--
|
||||
NOTE: This mimics the Maven Compiler Plugin which would normally set the output directory as the
|
||||
project's artifact file.
|
||||
-->
|
||||
<id>compile</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<mainFile>classes</mainFile>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>set</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>resolve</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<compileClassPath>target/compile.txt</compileClassPath>
|
||||
<runtimeClassPath>target/runtime.txt</runtimeClassPath>
|
||||
<testClassPath>target/test.txt</testClassPath>
|
||||
<significantPathLevels>2</significantPathLevels>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>runtime</goal>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package it0042;
|
||||
|
||||
public class C
|
||||
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>
|
Loading…
Reference in New Issue