mirror of https://github.com/apache/maven.git
moved
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@467862 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
06de6b3c77
commit
38f9db658f
|
@ -0,0 +1,34 @@
|
|||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.integrationtests</groupId>
|
||||
<artifactId>maven-core-integrationtests</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>Maven Integration Tests</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>**/IntegrationTestSuite.java</include>
|
||||
</includes>
|
||||
<forkMode>never</forkMode>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-verifier</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,122 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
import junit.framework.TestResult;
|
||||
|
||||
public class IntegrationTestSuite
|
||||
extends TestCase
|
||||
{
|
||||
public static Test suite()
|
||||
{
|
||||
TestSuite suite = new TestSuite();
|
||||
suite.addTestSuite( MavenIT0000Test.class );
|
||||
suite.addTestSuite( MavenIT0001Test.class );
|
||||
suite.addTestSuite( MavenIT0002Test.class );
|
||||
suite.addTestSuite( MavenIT0003Test.class );
|
||||
suite.addTestSuite( MavenIT0004Test.class );
|
||||
suite.addTestSuite( MavenIT0005Test.class );
|
||||
suite.addTestSuite( MavenIT0006Test.class );
|
||||
suite.addTestSuite( MavenIT0007Test.class );
|
||||
suite.addTestSuite( MavenIT0008Test.class );
|
||||
suite.addTestSuite( MavenIT0009Test.class );
|
||||
suite.addTestSuite( MavenIT0010Test.class );
|
||||
suite.addTestSuite( MavenIT0011Test.class );
|
||||
suite.addTestSuite( MavenIT0012Test.class );
|
||||
suite.addTestSuite( MavenIT0013Test.class );
|
||||
suite.addTestSuite( MavenIT0014Test.class );
|
||||
suite.addTestSuite( MavenIT0016Test.class );
|
||||
suite.addTestSuite( MavenIT0017Test.class );
|
||||
suite.addTestSuite( MavenIT0018Test.class );
|
||||
suite.addTestSuite( MavenIT0019Test.class );
|
||||
suite.addTestSuite( MavenIT0020Test.class );
|
||||
suite.addTestSuite( MavenIT0021Test.class );
|
||||
suite.addTestSuite( MavenIT0022Test.class );
|
||||
suite.addTestSuite( MavenIT0023Test.class );
|
||||
suite.addTestSuite( MavenIT0024Test.class );
|
||||
suite.addTestSuite( MavenIT0025Test.class );
|
||||
suite.addTestSuite( MavenIT0026Test.class );
|
||||
suite.addTestSuite( MavenIT0027Test.class );
|
||||
suite.addTestSuite( MavenIT0028Test.class );
|
||||
suite.addTestSuite( MavenIT0029Test.class );
|
||||
suite.addTestSuite( MavenIT0030Test.class );
|
||||
suite.addTestSuite( MavenIT0031Test.class );
|
||||
suite.addTestSuite( MavenIT0032Test.class );
|
||||
suite.addTestSuite( MavenIT0033Test.class );
|
||||
suite.addTestSuite( MavenIT0034Test.class );
|
||||
suite.addTestSuite( MavenIT0035Test.class );
|
||||
suite.addTestSuite( MavenIT0036Test.class );
|
||||
suite.addTestSuite( MavenIT0037Test.class );
|
||||
suite.addTestSuite( MavenIT0038Test.class );
|
||||
suite.addTestSuite( MavenIT0039Test.class );
|
||||
suite.addTestSuite( MavenIT0040Test.class );
|
||||
suite.addTestSuite( MavenIT0041Test.class );
|
||||
suite.addTestSuite( MavenIT0042Test.class );
|
||||
suite.addTestSuite(MavenIT0043Test.class);
|
||||
suite.addTestSuite( MavenIT0044Test.class );
|
||||
suite.addTestSuite( MavenIT0045Test.class );
|
||||
suite.addTestSuite( MavenIT0046Test.class );
|
||||
suite.addTestSuite( MavenIT0047Test.class );
|
||||
suite.addTestSuite( MavenIT0048Test.class );
|
||||
suite.addTestSuite( MavenIT0049Test.class );
|
||||
suite.addTestSuite( MavenIT0050Test.class );
|
||||
suite.addTestSuite( MavenIT0051Test.class );
|
||||
suite.addTestSuite( MavenIT0052Test.class );
|
||||
suite.addTestSuite( MavenIT0053Test.class );
|
||||
suite.addTestSuite( MavenIT0054Test.class );
|
||||
suite.addTestSuite( MavenIT0055Test.class );
|
||||
suite.addTestSuite( MavenIT0056Test.class );
|
||||
suite.addTestSuite( MavenIT0057Test.class );
|
||||
suite.addTestSuite( MavenIT0058Test.class );
|
||||
suite.addTestSuite( MavenIT0059Test.class );
|
||||
suite.addTestSuite( MavenIT0060Test.class );
|
||||
suite.addTestSuite( MavenIT0061Test.class );
|
||||
suite.addTestSuite( MavenIT0062Test.class );
|
||||
suite.addTestSuite( MavenIT0063Test.class );
|
||||
suite.addTestSuite( MavenIT0064Test.class );
|
||||
suite.addTestSuite( MavenIT0065Test.class );
|
||||
suite.addTestSuite( MavenIT0066Test.class );
|
||||
suite.addTestSuite( MavenIT0067Test.class );
|
||||
suite.addTestSuite( MavenIT0068Test.class );
|
||||
suite.addTestSuite( MavenIT0069Test.class );
|
||||
suite.addTestSuite( MavenIT0070Test.class );
|
||||
suite.addTestSuite( MavenIT0071Test.class );
|
||||
suite.addTestSuite( MavenIT0072Test.class );
|
||||
suite.addTestSuite( MavenIT0073Test.class );
|
||||
suite.addTestSuite( MavenIT0074Test.class );
|
||||
suite.addTestSuite( MavenIT0075Test.class );
|
||||
suite.addTestSuite( MavenIT0076Test.class );
|
||||
suite.addTestSuite( MavenIT0077Test.class );
|
||||
suite.addTestSuite( MavenIT0078Test.class );
|
||||
suite.addTestSuite( MavenIT0079Test.class );
|
||||
suite.addTestSuite( MavenIT0080Test.class );
|
||||
suite.addTestSuite( MavenIT0081Test.class );
|
||||
suite.addTestSuite( MavenIT0082Test.class );
|
||||
suite.addTestSuite( MavenIT0083Test.class );
|
||||
suite.addTestSuite( MavenIT0084Test.class );
|
||||
suite.addTestSuite( MavenIT0085Test.class );
|
||||
suite.addTestSuite( MavenIT0086Test.class );
|
||||
suite.addTestSuite( MavenIT0087Test.class );
|
||||
suite.addTestSuite( MavenIT0088Test.class );
|
||||
suite.addTestSuite( MavenIT0089Test.class );
|
||||
// suite.addTestSuite(MavenIT0090Test.class);
|
||||
// suite.addTestSuite(MavenIT0091Test.class);
|
||||
suite.addTestSuite( MavenIT0092Test.class );
|
||||
suite.addTestSuite( MavenIT0094Test.class );
|
||||
suite.addTestSuite( MavenIT0095Test.class );
|
||||
suite.addTestSuite(MavenIT0096Test.class);
|
||||
suite.addTestSuite(MavenIT0097Test.class);
|
||||
// suite.addTestSuite(MavenIT0098Test.class);
|
||||
suite.addTestSuite( MavenIT0099Test.class );
|
||||
suite.addTestSuite( MavenIT0100Test.class );
|
||||
suite.addTestSuite( MavenIT0101Test.class );
|
||||
suite.addTestSuite( MavenIT0102Test.class );
|
||||
suite.addTestSuite( MavenIT0103Test.class );
|
||||
// suite.addTestSuite(MavenIT0104Test.class);
|
||||
suite.addTestSuite( MavenIT0105Test.class );
|
||||
// suite.addTestSuite(MavenIT0106Test.class);
|
||||
// suite.addTestSuite(MavenIT0107Test.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0000Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* The simplest of builds. We have one application class and one test
|
||||
* class. There are no resources, no source generation, no resource
|
||||
* generation and a the super model is employed to provide the build
|
||||
* information.
|
||||
*/
|
||||
public void testit0000()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0000" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0000/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0000/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0000-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/surefire-reports/org.apache.maven.it0000.PersonTest.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0000 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0001Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Builds upon it0000: we add an application resource that is packaged
|
||||
* up in the resultant JAR.
|
||||
*/
|
||||
public void testit0001()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0001" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0001-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0001-1.0.jar!/it0001.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0001 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0002Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Builds upon it0001: we add the download of a dependency. We delete
|
||||
* the JAR from the local repository and make sure it is there post build.
|
||||
*/
|
||||
public void testit0002()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0002" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0002/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0002/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0002-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0002-1.0.jar!/it0002.properties" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0002 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0003Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Builds upon it0001: we add a jar installation step. We delete the JAR
|
||||
* from the local repository to make sure it is there post build.
|
||||
*/
|
||||
public void testit0003()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0003" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-it-it0003", "1.0", "jar" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0003/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0003/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0003-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0003-1.0.jar!/it0003.properties" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven.its.it0003", "maven-it-it0003", "1.0", "jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0003 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0004Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* The simplest of pom installation. We have a pom and we install it in
|
||||
* local repository.
|
||||
*/
|
||||
public void testit0004()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0004" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-it-it0004", "1.0", "pom" );
|
||||
verifier.executeGoal( "install:install" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven.its.it0004", "maven-it-it0004", "1.0", "pom" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0004 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0005Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* The simplest of pom installation. We have a snapshot pom and we install
|
||||
* it in local repository.
|
||||
*/
|
||||
public void testit0005()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0005" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-it-it0005", "1.0-SNAPSHOT", "pom" );
|
||||
verifier.executeGoal( "install:install" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven.its.it0005", "maven-it-it0005", "1.0-SNAPSHOT", "pom" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0005 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0006Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Integration test for the verifier plugin.
|
||||
*/
|
||||
public void testit0006()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0006" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "integration-test" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0006 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0007Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* We specify a parent in the POM and make sure that it is downloaded as
|
||||
* part of the process.
|
||||
*/
|
||||
public void testit0007()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0007" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.plugins", "maven-plugin-parent", "2.0", "pom" );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0007/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0007/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0007-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0007-1.0.jar!/it0007.properties" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven.plugins", "maven-plugin-parent", "2.0", "pom" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0007 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0008Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Simple goal decoration where a plugin binds to a phase and the plugin must
|
||||
* be downloaded from a remote repository before it can be executed. This
|
||||
* test also checks to make sure that mojo parameters are aligned to the
|
||||
* project basedir when their type is "java.io.File".
|
||||
*/
|
||||
public void testit0008()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0008" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-touch", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/touch.txt" );
|
||||
verifier.assertFilePresent( "target/test-basedir-alignment/touch.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0008 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0009Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test plugin configuration and goal configuration that overrides what the
|
||||
* mojo has specified.
|
||||
*/
|
||||
public void testit0009()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0009" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-touch", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "generate-resources" );
|
||||
verifier.assertFilePresent( "target/pluginItem" );
|
||||
verifier.assertFilePresent( "target/goalItem" );
|
||||
verifier.assertFileNotPresent( "target/bad-item" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0009 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0010Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Since the artifact resolution does not use the project builder, we must
|
||||
* ensure that the full hierarchy of all dependencies is resolved. This
|
||||
* includes the dependencies of the parent-pom's of dependencies. This test
|
||||
* will check this, by depending on classworlds, which is a dependency of
|
||||
* maven-component, which is the parent of maven-plugin, which is an
|
||||
* explicit dependency of this test.
|
||||
* # TODO: must correct the assumptions of this test
|
||||
*/
|
||||
public void testit0010()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0010" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0010/PersonFinder.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0010 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0011Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test specification of dependency versions via <dependencyManagement/>.
|
||||
*/
|
||||
public void testit0011()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0011" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0011/PersonFinder.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0011 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0012Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test simple POM interpolation
|
||||
*/
|
||||
public void testit0012()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0012" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/touch-3.8.1.txt" );
|
||||
verifier.assertFilePresent( "child-project/target/child-touch-3.0.3.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0012 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0013Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test plugin-plugin, which tests maven-plugin-tools-api and
|
||||
* maven-plugin-tools-java. This will generate a plugin descriptor from
|
||||
* java-based mojo sources, install the plugin, and then use it.
|
||||
*/
|
||||
public void testit0013()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0013" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-it0013", "1.0-SNAPSHOT", "maven-plugin" );
|
||||
List goals = Arrays.asList( new String[]{"install", "org.apache.maven.its.it0013:maven-it-it0013:it0013"} );
|
||||
verifier.executeGoals( goals );
|
||||
verifier.assertFilePresent( "target/maven-it-it0013-1.0-SNAPSHOT.jar" );
|
||||
verifier.assertFilePresent( "target/it0013-verify" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0013 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0014Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test POM configuration by settings the -source and -target for the
|
||||
* compiler to 1.4
|
||||
*/
|
||||
public void testit0014()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0014" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0014 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0016Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test a WAR generation
|
||||
*/
|
||||
public void testit0016()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0016" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0016/Person.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0016-1.0/index.html" );
|
||||
verifier.assertFilePresent(
|
||||
"target/maven-it-it0016-1.0/WEB-INF/classes/org/apache/maven/it0016/Person.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0016-1.0/WEB-INF/lib/commons-logging-1.0.3.jar" );
|
||||
verifier.assertFileNotPresent( "target/maven-it-it0016-1.0/WEB-INF/lib/servletapi-2.4-20040521.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0016-1.0.war" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0016-1.0.war!/index.html" );
|
||||
verifier.assertFilePresent(
|
||||
"target/maven-it-it0016-1.0.war!/WEB-INF/classes/org/apache/maven/it0016/Person.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0016-1.0.war!/WEB-INF/lib/commons-logging-1.0.3.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0016 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0017Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test an EJB generation
|
||||
*/
|
||||
public void testit0017()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0017" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0017/Person.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0017-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0017-1.0.jar!/META-INF/ejb-jar.xml" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0017-1.0.jar!/org/apache/maven/it0017/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0017 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0018Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Ensure that managed dependencies for dependency POMs are calculated
|
||||
* correctly when resolved. Removes commons-logging-1.0.3 and checks it is
|
||||
* redownloaded.
|
||||
*/
|
||||
public void testit0018()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0018" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "commons-logging", "commons-logging", "1.0.3", "jar" );
|
||||
verifier.executeGoal( "package" );
|
||||
// TODO: I would like to build some small core-it artifacts for this purpose instead
|
||||
verifier.assertArtifactPresent( "commons-logging", "commons-logging", "1.0.3", "jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0018 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0019Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that a version is managed by pluginManagement in the super POM
|
||||
*/
|
||||
public void testit0019()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0019" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0019/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0019 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0020Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test beanshell mojo support.
|
||||
*/
|
||||
public void testit0020()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0020" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-it0020", "1.0-SNAPSHOT", "maven-plugin" );
|
||||
List goals = Arrays.asList( new String[]{"install", "org.apache.maven.its.it0020:maven-it-it0020:it0020"} );
|
||||
verifier.executeGoals( goals );
|
||||
verifier.assertFilePresent( "target/out.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0020 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0021Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test pom-level profile inclusion (this one is activated by system
|
||||
* property).
|
||||
*/
|
||||
public void testit0021()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0021" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put( "includeProfile", "true" );
|
||||
verifier.setSystemProperties( systemProperties );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0021 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0022Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test profile inclusion from profiles.xml (this one is activated by system
|
||||
* property).
|
||||
*/
|
||||
public void testit0022()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0022" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put( "includeProfile", "true" );
|
||||
verifier.setSystemProperties( systemProperties );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/test.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0022 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0023Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test profile inclusion from settings.xml (this one is activated by an id
|
||||
* in the activeProfiles section).
|
||||
*/
|
||||
public void testit0023()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0023" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put( "org.apache.maven.user-settings", "settings.xml" );
|
||||
verifier.setSystemProperties( systemProperties );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/test.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0023 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0024Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test usage of <executions/> inside a plugin rather than <goals/>
|
||||
* that are directly inside th plugin.
|
||||
*/
|
||||
public void testit0024()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0024" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "generate-sources" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0024/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0024 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0025Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test multiple goal executions with different execution-level configs.
|
||||
*/
|
||||
public void testit0025()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0025" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "process-sources" );
|
||||
verifier.assertFilePresent( "target/test.txt" );
|
||||
verifier.assertFilePresent( "target/test2.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0025 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0026Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test merging of global- and user-level settings.xml files.
|
||||
*/
|
||||
public void testit0026()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0026" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put( "org.apache.maven.user-settings", "user-settings.xml" );
|
||||
systemProperties.put( "org.apache.maven.global-settings", "global-settings.xml" );
|
||||
verifier.setSystemProperties( systemProperties );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/test.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0026 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0027Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test @execute with a custom lifecycle, including configuration
|
||||
*/
|
||||
public void testit0027()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0027" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List goals = Arrays.asList( new String[]{
|
||||
"org.apache.maven.its.plugins:maven-it-plugin-fork:fork",
|
||||
"org.apache.maven.its.plugins:maven-it-plugin-fork:fork-goal"} );
|
||||
verifier.executeGoals( goals );
|
||||
verifier.assertFilePresent( "target/forked/touch.txt" );
|
||||
verifier.assertFilePresent( "target/forked2/touch.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0027 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0028Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that unused configuration parameters from the POM don't cause the
|
||||
* mojo to fail...they will show up as warnings in the -X output instead.
|
||||
*/
|
||||
public void testit0028()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0028" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0028 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0029Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test for pluginManagement injection of plugin configuration.
|
||||
*/
|
||||
public void testit0029()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0029" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.it", "maven-it-it0029", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.deleteArtifact( "org.apache.maven.it", "maven-it-it0029-child", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "child-project/target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0029 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0030Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test for injection of dependencyManagement through parents of
|
||||
* dependency poms.
|
||||
*/
|
||||
public void testit0030()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0030" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.it", "maven-it-it0030", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.deleteArtifact( "org.apache.maven.it", "maven-it-it0030-child-hierarchy", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.deleteArtifact( "org.apache.maven.it", "maven-it-it0030-child-project1", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.deleteArtifact( "org.apache.maven.it", "maven-it-it0030-child-project2", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "child-hierarchy/project2/target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0030 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0031Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test usage of plugins.xml mapping file on the repository to resolve
|
||||
* plugin artifactId from it's prefix using the pluginGroups in
|
||||
* the provided settings.xml.
|
||||
*/
|
||||
public void testit0031()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0031" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put( "org.apache.maven.user-settings", "settings.xml" );
|
||||
systemProperties.put( "model", "src/main/mdo/test.mdo" );
|
||||
systemProperties.put( "version", "1.0.0" );
|
||||
verifier.setSystemProperties( systemProperties );
|
||||
Properties verifierProperties = new Properties();
|
||||
verifierProperties.put( "failOnErrorOutput", "false" );
|
||||
verifier.setVerifierProperties( verifierProperties );
|
||||
verifier.executeGoal( "modello:java" );
|
||||
verifier.assertFilePresent( "target/generated-sources/modello/org/apache/maven/it/it0031/Root.java" );
|
||||
// don't verify error free log
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0031 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0032Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Tests that a specified Maven version requirement that is lower doesn't cause any problems
|
||||
*/
|
||||
public void testit0032()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0032" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0032/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0032/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0032-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0032-1.0.jar!/it0032.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0032 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0033Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test an EAR generation
|
||||
*/
|
||||
public void testit0033()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0033" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0033-1.0.ear" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0033-1.0.ear!/META-INF/application.xml" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0033-1.0.ear!/META-INF/appserver-application.xml" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0033 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0034Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test version range junit [3.7,) resolves to 3.8.1
|
||||
*/
|
||||
public void testit0034()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0034" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.4", "jar" );
|
||||
verifier.deleteArtifact( "junit", "junit", "3.8", "jar" );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertArtifactPresent( "junit", "junit", "3.8", "jar" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.4", "jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0034 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0035Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test artifact relocation.
|
||||
*/
|
||||
public void testit0035()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0035" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.1", "jar" );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.1", "pom" );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom" );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.1", "jar" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.1", "pom" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0035 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0036Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test building from release-pom.xml when it's available
|
||||
*/
|
||||
public void testit0036()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0036" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0036-1.0.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0036 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0037Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test building with alternate pom file using '-f'
|
||||
*/
|
||||
public void testit0037()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0037" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-f pom2.xml" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0037-1.0-build2.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0037 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0038Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test building project from outside the project directory using '-f'
|
||||
* option
|
||||
*/
|
||||
public void testit0038()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0038" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-f project/pom2.xml" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "project/target/maven-it-it0038-1.0-build2.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0038 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0039Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test reactor for projects that have release-pom.xml in addition to
|
||||
* pom.xml. The release-pom.xml file should be chosen above pom.xml for
|
||||
* these projects in the build.
|
||||
*/
|
||||
public void testit0039()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0039" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-r" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "project/target/maven-it-it0039-p1-1.0.jar" );
|
||||
verifier.assertFilePresent( "project2/target/maven-it-it0039-p2-1.0.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0039 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0040Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test the use of a packaging from a plugin
|
||||
*/
|
||||
public void testit0040()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0040" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0040-1.0-it.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0040 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0041Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test the use of a new type from a plugin
|
||||
*/
|
||||
public void testit0041()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0041" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.2", "coreit-artifact" );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0041-1.0-SNAPSHOT.jar" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.2", "coreit-artifact" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.2", "pom" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0041 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0042Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that the reactor can establish the artifact location of known projects for dependencies
|
||||
*/
|
||||
public void testit0042()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0042" );
|
||||
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.assertFilePresent( "test-component-c/target/my-test" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0042 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0043Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test for repository inheritence - ensure using the same id overrides the defaults
|
||||
*/
|
||||
public void testit0043()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0043" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0043-1.0-SNAPSHOT.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0043 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0044Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test --settings CLI option
|
||||
*/
|
||||
public void testit0044()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0044" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--settings settings.xml" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/test.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0044 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0045Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test non-reactor behavior when plugin declares "@requiresProject false"
|
||||
*/
|
||||
public void testit0045()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0045" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-no-project", "1.0", "maven-plugin" );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--no-plugin-registry" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-no-project:light-touch" );
|
||||
verifier.assertFilePresent( "target/touch.txt" );
|
||||
verifier.assertFileNotPresent( "subproject/target/touch.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0045 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0046Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test fail-never reactor behavior. Forces an exception to be thrown in
|
||||
* the first module, but checks that the second modules is built.
|
||||
*/
|
||||
public void testit0046()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0046" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.plugins", "maven-it-it-plugin", "1.0", "maven-plugin" );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--no-plugin-registry --fail-never" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/touch.txt" );
|
||||
verifier.assertFileNotPresent( "subproject/target/touch.txt" );
|
||||
verifier.assertFilePresent( "subproject2/target/touch.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0046 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0047Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test the use case for having a compile time dependency be transitive:
|
||||
* when you extend a class you need its dependencies at compile time.
|
||||
*/
|
||||
public void testit0047()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0047" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0047/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0047 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0048Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that default values for mojo parameters are working (indirectly,
|
||||
* by verifying that the Surefire mojo is functioning correctly).
|
||||
*/
|
||||
public void testit0048()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0048" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.assertFilePresent( "target/testFileOutput.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0048 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0049Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test parameter alias usage.
|
||||
*/
|
||||
public void testit0049()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0049" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
//todo: i don't think we need to delete this plugin
|
||||
//verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-touch", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/touchFile.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0049 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0050Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test surefire inclusion/exclusions
|
||||
*/
|
||||
public void testit0050()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0050" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/testTouchFile.txt" );
|
||||
verifier.assertFilePresent( "target/defaultTestTouchFile.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0050 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0051Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test source attachment when -DperformRelease=true is specified.
|
||||
*/
|
||||
public void testit0051()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0051" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--no-plugin-registry -DperformRelease=true" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0051-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0051-1.0-sources.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0051 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0052Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that source attachment doesn't take place when
|
||||
* -DperformRelease=true is missing.
|
||||
*/
|
||||
public void testit0052()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0052" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--no-plugin-registry" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0052-1.0.jar" );
|
||||
verifier.assertFileNotPresent( "target/maven-it-it0052-1.0-sources.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0052 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0053Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that attached artifacts have the same buildnumber and timestamp
|
||||
* as the main artifact. This will not correctly verify until we have
|
||||
* some way to pattern-match the buildnumber/timestamp...
|
||||
*/
|
||||
public void testit0053()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0053" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--no-plugin-registry" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0053-1.0-SNAPSHOT.jar" );
|
||||
verifier.assertFileNotPresent( "target/maven-it-it0053-1.0-SNAPSHOT-sources.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0053 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0054Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test resource filtering.
|
||||
*/
|
||||
public void testit0054()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0054" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0054/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0054/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0054-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0054-1.0.jar!/it0054.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0054 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0055Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that source includes/excludes with in the compiler plugin config.
|
||||
* This will test excludes and testExcludes...
|
||||
*/
|
||||
public void testit0055()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0055" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test-compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonTest.class" );
|
||||
verifier.assertFileNotPresent( "target/classes/org/apache/maven/it0001/PersonTwo.class" );
|
||||
verifier.assertFileNotPresent( "target/test-classes/org/apache/maven/it0001/PersonTwoTest.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0055 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0056Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that multiple executions of the compile goal with different
|
||||
* includes/excludes will succeed.
|
||||
*/
|
||||
public void testit0056()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0056" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test-compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/PersonTwo.class" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/PersonThree.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonTwoTest.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonThreeTest.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0056 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0057Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that scope == 'provided' dependencies are available to tests.
|
||||
*/
|
||||
public void testit0057()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0057" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0057-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0057-1.0.jar!/it0001.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0057 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0058Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that profiles from settings.xml do not pollute module lists
|
||||
* across projects in a reactorized build.
|
||||
*/
|
||||
public void testit0058()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0058" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--settings ./settings.xml" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "subproject/target/subproject-1.0.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0058 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0059Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that maven-1 POMs will be ignored but not stop the resolution
|
||||
* process.
|
||||
*/
|
||||
public void testit0059()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0059" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
Properties verifierProperties = new Properties();
|
||||
verifierProperties.put( "failOnErrorOutput", "false" );
|
||||
verifier.setVerifierProperties( verifierProperties );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0059-1.0.jar" );
|
||||
// don't verify error free log
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0059 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0060Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test aggregation of list configuration items when using
|
||||
* 'combine.children=append' attribute. Specifically, merge the list of
|
||||
* excludes for the testCompile mojo.
|
||||
*/
|
||||
public void testit0060()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0060" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.assertFilePresent( "subproject/target/classes/org/apache/maven/it0060/Person.class" );
|
||||
verifier.assertFilePresent( "subproject/target/test-classes/org/apache/maven/it0060/PersonTest.class" );
|
||||
verifier.assertFileNotPresent( "subproject/target/test-classes/org/apache/maven/it0060/PersonTwoTest.class" );
|
||||
verifier.assertFileNotPresent( "subproject/target/test-classes/org/apache/maven/it0060/PersonThreeTest.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0060 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0061Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that deployment of artifacts to a legacy-layout repository
|
||||
* results in a groupId directory of 'the.full.group.id' instead of
|
||||
* 'the/full/group/id'.
|
||||
*/
|
||||
public void testit0061()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0061" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "deploy" );
|
||||
verifier.assertFilePresent( "target/test-repo/org.apache.maven.its.it0061/jars/maven-it-it0061-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/test-repo/org.apache.maven.its.it0061/poms/maven-it-it0061-1.0.pom" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0061 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0062Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that a deployment of a snapshot falls back to a non-snapshot repository if no snapshot repository is
|
||||
* specified.
|
||||
*/
|
||||
public void testit0062()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0062" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-it-it0062-SNAPSHOT", "1.0", "jar" );
|
||||
verifier.executeGoal( "deploy" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0062/Person.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0062-1.0-SNAPSHOT.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0062 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0063Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test the use of a system scoped dependency to tools.jar.
|
||||
*/
|
||||
public void testit0063()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0063" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0001/Person.class" );
|
||||
verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0001/PersonTest.class" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0063-1.0.jar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0063-1.0.jar!/it0001.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0063 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0064Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test the use of a mojo that uses setters instead of private fields
|
||||
* for the population of configuration values.
|
||||
*/
|
||||
public void testit0064()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0064" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-setter", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-setter:setter-touch" );
|
||||
verifier.assertFilePresent( "target/fooValue" );
|
||||
verifier.assertFilePresent( "target/barValue.baz" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0064 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0065Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that the basedir of the parent is set correctly.
|
||||
*/
|
||||
public void testit0065()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0065" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "subproject/target/child-basedir" );
|
||||
verifier.assertFilePresent( "parent-basedir" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0065 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0066Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that nonstandard POM files will be installed correctly.
|
||||
*/
|
||||
public void testit0066()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0066" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-f other-pom.xml" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0066 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0067Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test activation of a profile from the command line.
|
||||
*/
|
||||
public void testit0067()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0067" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-P test-profile" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0021/Person.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0067 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0068Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test repository accumulation.
|
||||
*/
|
||||
public void testit0068()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0068" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.codehaus.modello", "modello-core", "1.0-alpha-3", "jar" );
|
||||
Properties verifierProperties = new Properties();
|
||||
verifierProperties.put( "failOnErrorOutput", "false" );
|
||||
verifier.setVerifierProperties( verifierProperties );
|
||||
verifier.executeGoal( "generate-sources" );
|
||||
verifier.assertFilePresent( "target/generated-sources/modello/org/apache/maven/settings/Settings.java" );
|
||||
// don't verify error free log
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0068 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0069Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test offline mode.
|
||||
*/
|
||||
public void testit0069()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0069" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-o" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0069/ClassworldBasedThing.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0069 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0070Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test a RAR generation.
|
||||
*/
|
||||
public void testit0070()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0070" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0070-1.0.rar" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0070-1.0.rar!/META-INF/ra.xml" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0070-1.0.rar!/SomeResource.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0070 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0071Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verifies that dotted property references work within plugin
|
||||
* configurations.
|
||||
*/
|
||||
public void testit0071()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0071" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.plugins", "maven-it-it-plugin", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||
verifier.assertFilePresent( "target/foo2" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0071 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0072Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verifies that property references with dotted notation work within
|
||||
* POM interpolation.
|
||||
*/
|
||||
public void testit0072()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0072" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "target/maven-it-it0072-1.0-SNAPSHOT.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0072 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0073Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Tests context passing between mojos in the same plugin.
|
||||
*/
|
||||
public void testit0073()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0073" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-context-passing", "1.0", "maven-plugin" );
|
||||
List goals = Arrays.asList( new String[]{
|
||||
"org.apache.maven.its.plugins:maven-it-plugin-context-passing:throw",
|
||||
"org.apache.maven.its.plugins:maven-it-plugin-context-passing:catch"} );
|
||||
verifier.executeGoals( goals );
|
||||
verifier.assertFilePresent( "target/thrown-value" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0073 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0074Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that plugin-level configuration instances are not nullified by
|
||||
* execution-level configuration instances.
|
||||
*/
|
||||
public void testit0074()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0074" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "eclipse:eclipse" );
|
||||
verifier.assertFilePresent( ".classpath" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0074 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0075Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that direct invocation of a mojo from the command line still
|
||||
* results in the processing of modules included via profiles.
|
||||
*/
|
||||
public void testit0075()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0075" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-Dactivate=anything" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
List goals = Arrays.asList( new String[]{"help:active-profiles", "package", "eclipse:eclipse", "clean:clean"} );
|
||||
verifier.executeGoals( goals );
|
||||
verifier.assertFileNotPresent( "sub1/target/maven-it-it0075-sub1-1.0.jar" );
|
||||
verifier.assertFileNotPresent( "sub2/target/maven-it-it0075-sub2-1.0.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0075 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0076Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that plugins in pluginManagement aren't included in the build
|
||||
* unless they are referenced by groupId/artifactId within the plugins
|
||||
* section of a pom.
|
||||
*/
|
||||
public void testit0076()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0076" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0076 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenIT0077Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test test jar attachment.
|
||||
*/
|
||||
public void testit0077()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0077" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.it0077", "sub1", "1.0", "test-jar" );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "--settings settings.xml" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven.its.it0077", "sub1", "1.0", "test-jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0077 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0078Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that configuration for maven-compiler-plugin is injected from
|
||||
* PluginManagement section even when it's not explicitly defined in the
|
||||
* plugins section.
|
||||
*/
|
||||
public void testit0078()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0078" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFileNotPresent( "target/classes/Test.class" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0078 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0079Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that source attachments have the same build number as the main
|
||||
* artifact when deployed.
|
||||
*/
|
||||
public void testit0079()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0079" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "deploy" );
|
||||
verifier.assertFilePresent( "target/test-repo/org/apache/maven/its/it0079/maven-it-it0079/SNAPSHOT/maven-it-it0079-*-1.jar" );
|
||||
verifier.assertFilePresent( "target/test-repo/org/apache/maven/its/it0079/maven-it-it0079/SNAPSHOT/maven-it-it0079-*-1-sources.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0079 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0080Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* 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.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0080 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0081Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test per-plugin dependencies.
|
||||
*/
|
||||
public void testit0081()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0081" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "test-component-c/target/org.apache.maven.wagon.providers.ftp.FtpWagon" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0081 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0082Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that the reactor can establish the artifact location of known projects for dependencies
|
||||
* using process-sources to see that it works even when they aren't compiled
|
||||
*/
|
||||
public void testit0082()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0082" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "process-sources" );
|
||||
verifier.assertFilePresent( "test-component-c/target/my-test" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0082 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0083Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that overriding a compile time dependency as provided in a WAR ensures it is not included.
|
||||
*/
|
||||
public void testit0083()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0083" );
|
||||
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-b-0.1.jar" );
|
||||
verifier.assertFileNotPresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/test-component-a-0.1.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/test-component-b-0.1.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0083 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0084Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that the collector selecting a particular version gets the correct subtree
|
||||
*/
|
||||
public void testit0084()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0084" );
|
||||
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.assertFilePresent( "test-component-c/target/test-component-c-0.1.war!/WEB-INF/lib/maven-core-it-support-1.4.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.war!/WEB-INF/lib/commons-io-1.0.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/test-component-a-0.1.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/test-component-b-0.1.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/maven-core-it-support-1.4.jar" );
|
||||
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/commons-io-1.0.jar" );
|
||||
verifier.assertFileNotPresent( "test-component-c/target/test-component-c-0.1/WEB-INF/lib/commons-lang-1.0.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0084 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0085Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that system-scoped dependencies get resolved with system scope
|
||||
* when they are resolved transitively via another (non-system)
|
||||
* dependency. Inherited scope should not apply in the case of
|
||||
* system-scoped dependencies, no matter where they are.
|
||||
*/
|
||||
public void testit0085()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0085" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFileNotPresent( "war/target/war-1.0/WEB-INF/lib/pom.xml" );
|
||||
verifier.assertFileNotPresent( "war/target/war-1.0/WEB-INF/lib/it0085-dep-1.0.jar" );
|
||||
verifier.assertFilePresent( "war/target/war-1.0/WEB-INF/lib/junit-3.8.1.jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0085 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0086Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that a plugin dependency class can be loaded from both the plugin classloader and the
|
||||
* context classloader available to the plugin.
|
||||
*/
|
||||
public void testit0086()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0086" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.plugins", "maven-it-it-plugin", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0086 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0087Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify that a project-level plugin dependency class can be loaded from both the plugin classloader
|
||||
* and the context classloader available to the plugin.
|
||||
*/
|
||||
public void testit0087()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0087" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.plugins", "maven-it-it-plugin", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0087 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0088Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test path translation.
|
||||
*/
|
||||
public void testit0088()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0088" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.assertFilePresent( "target/classes/test.properties" );
|
||||
verifier.assertFilePresent( "target/mojo-generated.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0088 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0089Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that Checkstyle PackageNamesLoader.loadModuleFactory(..) method will complete as-is with
|
||||
* the context classloader available to the plugin.
|
||||
*/
|
||||
public void testit0089()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0089" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.plugins", "maven-it-it-plugin", "1.0", "maven-plugin" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.assertFilePresent( "project/target/output.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0089 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MavenIT0090Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that ensures that envars are interpolated correctly into plugin
|
||||
* configurations.
|
||||
*/
|
||||
public void testit0090()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0090" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath(), true );
|
||||
Map envVars = new HashMap();
|
||||
envVars.put( "MAVEN_TEST_ENVAR", "MAVEN_TEST_ENVAR_VALUE" );
|
||||
verifier.executeGoal( "test", envVars );
|
||||
verifier.assertFilePresent( "target/mojo-generated.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0090 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* # it0091 currrently fails. Not sure if there is an associated JIRA.
|
||||
*/
|
||||
public class MavenIT0091Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that currently demonstrates that properties are not correctly
|
||||
* interpolated into other areas in the POM. This may strictly be a boolean
|
||||
* problem: I captured the problem as it was reported.
|
||||
*/
|
||||
public void testit0091()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0091" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.assertFilePresent( "target/classes/test.properties" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0091 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0092Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that legacy repositories with legacy snapshots download correctly.
|
||||
*/
|
||||
public void testit0092()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0092" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0092 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0094Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test classloading issues with mojos after 2.0 (MNG-1898).
|
||||
*/
|
||||
public void testit0094()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0094" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0094 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0095Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test URL calculation when modules are in sibling dirs of parent. (MNG-2006)
|
||||
*/
|
||||
public void testit0095()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0095" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "integration-test" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0095 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0096Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that plugin executions from >1 step of inheritance don't run multiple times.
|
||||
*/
|
||||
public void testit0096()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0096" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0096 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0097Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that the implied relative path for the parent POM works, even two
|
||||
* levels deep.
|
||||
*/
|
||||
public void testit0097()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0097" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.assertFilePresent( "project/project-level2/project-level3/target/it0097.txt" );
|
||||
verifier.assertFilePresent( "project/project-sibling-level2/target/it0097.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0097 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* # it0098 - something started failing here, not yet identified. MNG-2322
|
||||
*/
|
||||
public class MavenIT0098Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that quoted system properties are processed correctly. [MNG-1415]
|
||||
*/
|
||||
public void testit0098()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0098" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add( "-Dtest.property=\"Test Property\"" );
|
||||
verifier.setCliOptions( cliOptions );
|
||||
verifier.executeGoal( "test" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0098 PASS" );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenIT0099Test
|
||||
extends TestCase /*extends AbstractMavenIntegrationTest*/
|
||||
{
|
||||
|
||||
/**
|
||||
* Test that parent-POMs cached during a build are available as parents
|
||||
* to other POMs in the multimodule build. [MNG-2130]
|
||||
*/
|
||||
public void testit0099()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0099" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.it0099", "maven-it-it0099-parent", "1", "pom" );
|
||||
verifier.executeGoal( "package" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println( "it0099 PASS" );
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue