o Decoupled IT from production plugins

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@749141 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-03-01 22:30:36 +00:00
parent 9166c34310
commit cda737a6fe
6 changed files with 126 additions and 29 deletions

View File

@ -54,13 +54,14 @@ public class MavenITmng3023ReactorDependencyResolutionTest
// First pass. Make sure the dependency cannot be resolved.
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.setLogFileName( "log-a.txt" );
verifier.deleteArtifacts( "org.apache.maven.its.mng3023" );
try
{
verifier.executeGoal( "initialize" );
verifier.executeGoal( "validate" );
fail( "Expected failure to resolve dependency artifact without at least calling 'compile' phase." );
}
catch ( VerificationException e )
@ -87,11 +88,12 @@ public class MavenITmng3023ReactorDependencyResolutionTest
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3023" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.setLogFileName( "log-b.txt" );
verifier.deleteDirectory( "consumer/target" );
verifier.deleteArtifacts( "org.apache.maven.its.mng3023" );
verifier.executeGoal( "compile" );
verifier.executeGoal( "initialize" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
@ -118,11 +120,13 @@ public class MavenITmng3023ReactorDependencyResolutionTest
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3023" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteArtifacts( "org.apache.maven.its.mng3023" );
verifier.deleteDirectory( "consumer/target" );
verifier.setLogFileName( "log-c-1.txt" );
verifier.executeGoal( "install" );
verifier.executeGoal( "generate-sources" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
@ -130,8 +134,9 @@ public class MavenITmng3023ReactorDependencyResolutionTest
assertTrue( compileClassPath.toString(), compileClassPath.contains( "dependency-1.jar" ) );
assertFalse( compileClassPath.toString(), compileClassPath.contains( "dependency-classes" ) );
verifier.deleteDirectory( "consumer/target" );
verifier.setLogFileName( "log-c-2.txt" );
verifier.executeGoal( "initialize" );
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();

View File

@ -1,13 +1,38 @@
<?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>
<groupId>org.apache.maven.its.mng3023</groupId>
<artifactId>parent</artifactId>
<version>1</version>
<groupId>org.apache.maven.its.mng3023</groupId>
<artifactId>parent</artifactId>
<version>1</version>
</parent>
<artifactId>consumer</artifactId>
<name>Maven Integration Test :: MNG-3023 :: Consumer</name>
<description>Test that reactor projects are included in dependency resolution.</description>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng3023</groupId>
@ -15,7 +40,7 @@
<version>1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
@ -25,7 +50,7 @@
<executions>
<execution>
<id>compile-classpath</id>
<phase>initialize</phase>
<phase>validate</phase>
<goals>
<goal>compile</goal>
</goals>

View File

@ -1,14 +1,70 @@
<?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>
<groupId>org.apache.maven.its.mng3023</groupId>
<artifactId>parent</artifactId>
<version>1</version>
<groupId>org.apache.maven.its.mng3023</groupId>
<artifactId>parent</artifactId>
<version>1</version>
</parent>
<artifactId>dependency</artifactId>
<name>Maven Integration Test :: MNG-3023 :: Dependency</name>
<description>Test that reactor projects are included in dependency resolution.</description>
<build>
<outputDirectory>dependency-classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>compile</id>
<phase>initialize</phase>
<goals>
<goal>set</goal>
</goals>
<configuration>
<mainFile>dependency-classes</mainFile>
</configuration>
</execution>
<execution>
<id>install</id>
<phase>generate-sources</phase>
<goals>
<goal>set</goal>
<goal>attach-pom</goal>
<goal>install</goal>
</goals>
<configuration>
<mainFile>dependency-classes/dependency-1.jar</mainFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,13 +0,0 @@
package org.apache.maven.debug.mng2720;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@ -1,10 +1,34 @@
<?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>
<description>Test that reactor projects are included in dependency resolution.</description>
<groupId>org.apache.maven.its.mng3023</groupId>
<artifactId>parent</artifactId>
<version>1</version>
<packaging>pom</packaging>
<name>Maven Integration Test :: MNG-3023</name>
<description>Test that reactor projects are included in dependency resolution.</description>
<modules>
<module>dependency</module>