mirror of https://github.com/apache/maven.git
o first part of the integration tests, i can't get them all in at once without svn crapping out
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@465761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
201b42f016
commit
fb93c0c264
|
@ -0,0 +1,35 @@
|
|||
|
||||
<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,117 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
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,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0000 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0000", testDir);
|
||||
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-core-it0000-1.0.jar");
|
||||
verifier.assertFilePresent("target/surefire-reports/org.apache.maven.it0000.PersonTest.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0001 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0001", testDir);
|
||||
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-core-it0001-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0001-1.0.jar!/it0001.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0002 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0002", testDir);
|
||||
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-core-it0002-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0003 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0003", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven", "maven-core-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-core-it0003-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0003-1.0.jar!/it0003.properties");
|
||||
verifier.assertArtifactPresent("org.apache.maven", "maven-core-it0003", "1.0", "jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0004 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0004", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven", "maven-core-it0004", "1.0", "pom");
|
||||
verifier.executeGoal("install:install");
|
||||
verifier.assertArtifactPresent("org.apache.maven", "maven-core-it0004", "1.0", "pom");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0005 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0005", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven", "maven-core-it0005", "1.0-SNAPSHOT", "pom");
|
||||
verifier.executeGoal("install:install");
|
||||
verifier.assertArtifactPresent("org.apache.maven", "maven-core-it0005", "1.0-SNAPSHOT", "pom");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0006Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Integration test for the verifier plugin. */
|
||||
public void testit0006() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0006 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0006", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("integration-test");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0007 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0007", testDir);
|
||||
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-core-it0007-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0008 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0008", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0009 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0009", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0010 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0010", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0011Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test specification of dependency versions via <dependencyManagement/>. */
|
||||
public void testit0011() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0011 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0011", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0012Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test simple POM interpolation */
|
||||
public void testit0012() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0012 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0012", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("core-it: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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0013 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0013", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-it0013-plugin", "1.0-SNAPSHOT", "maven-plugin");
|
||||
List goals = Arrays.asList(new String[] {"install", "it0013:it0013"});
|
||||
verifier.executeGoals(goals);
|
||||
verifier.assertFilePresent("target/maven-it0013-plugin-1.0-SNAPSHOT.jar");
|
||||
verifier.assertFilePresent("target/it0013-verify");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0014 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0014", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0016Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test a WAR generation */
|
||||
public void testit0016() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0016 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0016", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/classes/org/apache/maven/it0016/Person.class");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0/index.html");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0/WEB-INF/classes/org/apache/maven/it0016/Person.class");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0/WEB-INF/lib/commons-logging-1.0.3.jar");
|
||||
verifier.assertFileNotPresent("target/maven-core-it0016-1.0/WEB-INF/lib/servletapi-2.4-20040521.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0.war");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0.war!/index.html");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0.war!/WEB-INF/classes/org/apache/maven/it0016/Person.class");
|
||||
verifier.assertFilePresent("target/maven-core-it0016-1.0.war!/WEB-INF/lib/commons-logging-1.0.3.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0017Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test an EJB generation */
|
||||
public void testit0017() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0017 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0017", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/classes/org/apache/maven/it0017/Person.class");
|
||||
verifier.assertFilePresent("target/maven-core-it0017-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0017-1.0.jar!/META-INF/ejb-jar.xml");
|
||||
verifier.assertFilePresent("target/maven-core-it0017-1.0.jar!/org/apache/maven/it0017/Person.class");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0018 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0018", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0019Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test that a version is managed by pluginManagement in the super POM */
|
||||
public void testit0019() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0019 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0019", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0020Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test beanshell mojo support. */
|
||||
public void testit0020() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0020 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0020", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-it0020-plugin", "1.0-SNAPSHOT", "maven-plugin");
|
||||
FileUtils.deleteFile(new File(basedir, "target/out.txt"));
|
||||
List goals = Arrays.asList(new String[] {"install", "it0020:it0020"});
|
||||
verifier.executeGoals(goals);
|
||||
verifier.assertFilePresent("target/out.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0021Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test pom-level profile inclusion (this one is activated by system
|
||||
property). */
|
||||
public void testit0021() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0021 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0021", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0022 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0022", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put("includeProfile", "true");
|
||||
verifier.setSystemProperties(systemProperties);
|
||||
verifier.executeGoal("core-it:touch");
|
||||
verifier.assertFilePresent("target/test.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0023 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0023", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put("org.apache.maven.user-settings", "settings.xml");
|
||||
verifier.setSystemProperties(systemProperties);
|
||||
verifier.executeGoal("core-it:touch");
|
||||
verifier.assertFilePresent("target/test.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0024 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0024", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("generate-sources");
|
||||
verifier.assertFilePresent("target/classes/org/apache/maven/it0001/Person.class");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0025Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test multiple goal executions with different execution-level configs. */
|
||||
public void testit0025() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0025 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0025", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0026Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test merging of global- and user-level settings.xml files. */
|
||||
public void testit0026() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0026 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0026", testDir);
|
||||
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("core-it:touch");
|
||||
verifier.assertFilePresent("target/test.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0027Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test @execute with a custom lifecycle, including configuration */
|
||||
public void testit0027() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0027 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0027", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
List goals = Arrays.asList(new String[] {"core-it:fork", "core-it:fork-goal"});
|
||||
verifier.executeGoals(goals);
|
||||
verifier.assertFilePresent("target/forked/touch.txt");
|
||||
verifier.assertFilePresent("target/forked2/touch.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0028 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0028", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0029Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test for pluginManagement injection of plugin configuration. */
|
||||
public void testit0029() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0029 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0029", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-core-it0029", "1.0-SNAPSHOT", "jar");
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-core-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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0030Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test for injection of dependencyManagement through parents of
|
||||
dependency poms. */
|
||||
public void testit0030() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0030 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0030", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-core-it0030", "1.0-SNAPSHOT", "jar");
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-core-it0030-child-hierarchy", "1.0-SNAPSHOT", "jar");
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-core-it0030-child-project1", "1.0-SNAPSHOT", "jar");
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-core-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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0031 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0031", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0032 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0032", testDir);
|
||||
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-core-it0032-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0032-1.0.jar!/it0032.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0033Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test an EAR generation */
|
||||
public void testit0033() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0033 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0033", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-core-it00xx-1.0.ear");
|
||||
verifier.assertFilePresent("target/maven-core-it00xx-1.0.ear!/META-INF/application.xml");
|
||||
verifier.assertFilePresent("target/maven-core-it00xx-1.0.ear!/META-INF/appserver-application.xml");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0034Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test version range junit [3.7,) resolves to 3.8.1 */
|
||||
public void testit0034() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0034 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0034", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0035Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test artifact relocation. */
|
||||
public void testit0035() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0035 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0035", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0036Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test building from release-pom.xml when it's available */
|
||||
public void testit0036() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0036 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0036", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-core-it0036-1.0.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0037Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test building with alternate pom file using '-f' */
|
||||
public void testit0037() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0037 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0037", testDir);
|
||||
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-core-it0037-1.0-build2.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0038Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test building project from outside the project directory using '-f'
|
||||
option */
|
||||
public void testit0038() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0038 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0038", testDir);
|
||||
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-core-it0037-1.0-build2.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0039 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0039", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
FileUtils.deleteFile(new File(basedir, "project/target/maven-core-it0039-p1-1.0.jar"));
|
||||
FileUtils.deleteFile(new File(basedir, "project2/target/maven-core-it0039-p2-1.0.jar"));
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add("-r");
|
||||
verifier.setCliOptions(cliOptions);
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("project/target/maven-core-it0039-p1-1.0.jar");
|
||||
verifier.assertFilePresent("project2/target/maven-core-it0039-p2-1.0.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0040Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test the use of a packaging from a plugin */
|
||||
public void testit0040() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0040 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0040", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-core-it0040-1.0-it.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0041Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test the use of a new type from a plugin */
|
||||
public void testit0041() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0041 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0041", testDir);
|
||||
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-core-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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0042 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0042", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0043Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test for repository inheritence - ensure using the same id overrides the defaults */
|
||||
public void testit0043() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0043 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0043", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-it0043-1.0-SNAPSHOT.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0044Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test --settings CLI option */
|
||||
public void testit0044() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0044 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0044", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add("--settings settings.xml");
|
||||
verifier.setCliOptions(cliOptions);
|
||||
verifier.executeGoal("core-it:touch");
|
||||
verifier.assertFilePresent("target/test.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0045Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test non-reactor behavior when plugin declares "@requiresProject false" */
|
||||
public void testit0045() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0045 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0045", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add("--no-plugin-registry");
|
||||
verifier.setCliOptions(cliOptions);
|
||||
verifier.executeGoal("core-it:light-touch");
|
||||
verifier.assertFilePresent("target/touch.txt");
|
||||
verifier.assertFileNotPresent("subproject/target/touch.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0046 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0046", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add("--no-plugin-registry --fail-never");
|
||||
verifier.setCliOptions(cliOptions);
|
||||
verifier.executeGoal("core-it: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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0047 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0047", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0048 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0048", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("test");
|
||||
verifier.assertFilePresent("target/testFileOutput.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0049Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test parameter alias usage. */
|
||||
public void testit0049() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0049 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0049", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
verifier.executeGoal("core-it:touch");
|
||||
verifier.assertFilePresent("target/touchFile.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0050Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test surefire inclusion/exclusions */
|
||||
public void testit0050() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0050 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0050", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0051Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test source attachment when -DperformRelease=true is specified. */
|
||||
public void testit0051() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0051 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0051", testDir);
|
||||
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-core-it0051-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0051-1.0-sources.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0052 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0052", testDir);
|
||||
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-core-it0051-1.0.jar");
|
||||
verifier.assertFileNotPresent("target/maven-core-it0051-1.0-sources.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0053 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0053", testDir);
|
||||
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-core-it0053-1.0-SNAPSHOT.jar");
|
||||
verifier.assertFileNotPresent("target/maven-core-it0053-1.0-SNAPSHOT-sources.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0054Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test resource filtering. */
|
||||
public void testit0054() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0054 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0054", testDir);
|
||||
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-core-it0054-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0054-1.0.jar!/it0054.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0055 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0055", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0056 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0056", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0057Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Verify that scope == 'provided' dependencies are available to tests. */
|
||||
public void testit0057() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0057 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0057", testDir);
|
||||
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-core-it0057-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0057-1.0.jar!/it0001.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0058 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0058", testDir);
|
||||
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/maven-core-it0058-subproject-1.0.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0059 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0059", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
Properties verifierProperties = new Properties();
|
||||
verifierProperties.put("failOnErrorOutput", "false");
|
||||
verifier.setVerifierProperties(verifierProperties);
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-core-it0059-1.0.jar");
|
||||
// don't verify error free log
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0060 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0060", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("test");
|
||||
verifier.assertFilePresent("subproject/target/classes/org/apache/maven/it0001/Person.class");
|
||||
verifier.assertFilePresent("subproject/target/test-classes/org/apache/maven/it0001/PersonTest.class");
|
||||
verifier.assertFileNotPresent("subproject/target/test-classes/org/apache/maven/it0001/PersonTwoTest.class");
|
||||
verifier.assertFileNotPresent("subproject/target/test-classes/org/apache/maven/it0001/PersonThreeTest.class");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0061 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0061", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("deploy");
|
||||
verifier.assertFilePresent("target/test-repo/org.apache.maven.it/jars/maven-core-it0061-1.0.jar");
|
||||
verifier.assertFilePresent("target/test-repo/org.apache.maven.it/poms/maven-core-it0061-1.0.pom");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0062 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0062", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven", "maven-core-it0062-SNAPSHOT", "1.0", "jar");
|
||||
verifier.executeGoal("deploy");
|
||||
verifier.assertFilePresent("target/classes/org/apache/maven/it0062/Person.class");
|
||||
verifier.assertFilePresent("target/maven-core-it0062-1.0-SNAPSHOT.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0063Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test the use of a system scoped dependency to tools.jar. */
|
||||
public void testit0063() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0063 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0063", testDir);
|
||||
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-core-it0063-1.0.jar");
|
||||
verifier.assertFilePresent("target/maven-core-it0063-1.0.jar!/it0001.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0064 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0064", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
verifier.executeGoal("core-it:setter-touch");
|
||||
verifier.assertFilePresent("target/fooValue");
|
||||
verifier.assertFilePresent("target/barValue.baz");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0065Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test that the basedir of the parent is set correctly. */
|
||||
public void testit0065() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0065 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0065", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
FileUtils.deleteFile(new File(basedir, "parent-basedir"));
|
||||
verifier.executeGoal("install");
|
||||
verifier.assertFilePresent("subproject/target/child-basedir");
|
||||
verifier.assertFilePresent("parent-basedir");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0066Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test that nonstandard POM files will be installed correctly. */
|
||||
public void testit0066() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0066 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0066", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0067Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test activation of a profile from the command line. */
|
||||
public void testit0067() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0067 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0067", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0068Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test repository accumulation. */
|
||||
public void testit0068() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0068 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0068", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0069Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test offline mode. */
|
||||
public void testit0069() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0069 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0069", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0070Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test a RAR generation. */
|
||||
public void testit0070() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0070 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0070", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-core-it0070-1.0.rar");
|
||||
verifier.assertFilePresent("target/maven-core-it0070-1.0.rar!/META-INF/ra.xml");
|
||||
verifier.assertFilePresent("target/maven-core-it0070-1.0.rar!/SomeResource.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0071Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Verifies that dotted property references work within plugin
|
||||
configurations. */
|
||||
public void testit0071() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0071 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0071", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
verifier.executeGoal("core-it:touch");
|
||||
verifier.assertFilePresent("target/foo2");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0072Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Verifies that property references with dotted notation work within
|
||||
POM interpolation. */
|
||||
public void testit0072() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0072 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0072", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFilePresent("target/maven-core-it0072-1.0-SNAPSHOT.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0073Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Tests context passing between mojos in the same plugin. */
|
||||
public void testit0073() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0073 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0073", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
List goals = Arrays.asList(new String[] {"core-it:throw", "core-it:catch"});
|
||||
verifier.executeGoals(goals);
|
||||
verifier.assertFilePresent("target/thrown-value");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0074 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0074", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("eclipse:eclipse");
|
||||
verifier.assertFilePresent(".classpath");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0075 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0075", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
FileUtils.deleteFile(new File(basedir, "sub1/target/maven-core-it0075-sub1-1.0.jar"));
|
||||
FileUtils.deleteFile(new File(basedir, "sub2/target/maven-core-it0075-sub2-1.0.jar"));
|
||||
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-core-it0075-sub1-1.0.jar");
|
||||
verifier.assertFileNotPresent("sub2/target/maven-core-it0075-sub2-1.0.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0076 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0076", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("install");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0077Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test test jar attachment. */
|
||||
public void testit0077() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0077 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0077", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.it", "maven-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.it", "maven-it0077-sub1", "1.0", "test-jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0078 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0078", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("compile");
|
||||
verifier.assertFileNotPresent("target/classes/Test.class");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0079 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0079", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("deploy");
|
||||
verifier.assertFilePresent("target/test-repo/org/apache/maven/it/maven-core-it0079/SNAPSHOT/maven-core-it0079-*-1.jar");
|
||||
verifier.assertFilePresent("target/test-repo/org/apache/maven/it/maven-core-it0079/SNAPSHOT/maven-core-it0079-*-1-sources.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0080 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0080", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0081Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test per-plugin dependencies. */
|
||||
public void testit0081() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0081 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0081", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0082 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0082", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0083 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0083", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0084Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Verify that the collector selecting a particular version gets the correct subtree */
|
||||
public void testit0084() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0084 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0084", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0085 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0085", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.assertFileNotPresent("war/target/it0085-war-1.0/WEB-INF/lib/pom.xml");
|
||||
verifier.assertFileNotPresent("war/target/it0085-war-1.0/WEB-INF/lib/it0085-dep-1.0.jar");
|
||||
verifier.assertFilePresent("war/target/it0085-war-1.0/WEB-INF/lib/junit-3.8.1.jar");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0086 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0086", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
verifier.executeGoal("validate");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0087 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0087", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
verifier.executeGoal("validate");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0088Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test path translation. */
|
||||
public void testit0088() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0088 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0088", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0089 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0089", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.plugins", "maven-core-it-plugin", "1.0", "maven-plugin");
|
||||
verifier.executeGoal("install");
|
||||
verifier.assertFilePresent("project/target/output.txt");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0090Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test that ensures that envars are interpolated correctly into plugin
|
||||
configurations. */
|
||||
public void testit0090() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0090 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0090", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("test");
|
||||
verifier.assertFilePresent("target/mojo-generated.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0091 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0091", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("test");
|
||||
verifier.assertFilePresent("target/classes/test.properties");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0092Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test that legacy repositories with legacy snapshots download correctly. */
|
||||
public void testit0092() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0092 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0092", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0094Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test classloading issues with mojos after 2.0 (MNG-1898). */
|
||||
public void testit0094() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0094 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0094", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("install");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0095 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0095", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("integration-test");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0096 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0096", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.executeGoal("package");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0097 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0097", testDir);
|
||||
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("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
public class MavenIT0098Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
|
||||
|
||||
/** Test that quoted system properties are processed correctly. [MNG-1415] */
|
||||
public void testit0098() throws Exception {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0098 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0098", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
FileUtils.deleteDirectory(new File(basedir, "${basedir}/test project"));
|
||||
List cliOptions = new ArrayList();
|
||||
cliOptions.add("-Dtest.property=\"Test Property\"");
|
||||
verifier.setCliOptions(cliOptions);
|
||||
verifier.executeGoal("test");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.apache.maven.it.*;
|
||||
import org.apache.maven.it.util.*;
|
||||
|
||||
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 {
|
||||
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
|
||||
File testDir = new File(basedir, getName());
|
||||
FileUtils.deleteDirectory(testDir);
|
||||
System.out.println("Extracting it0099 to " + testDir.getAbsolutePath());
|
||||
ResourceExtractor.extractResourcePath(getClass(), "/it0099", testDir);
|
||||
Verifier verifier = new Verifier(testDir.getAbsolutePath());
|
||||
verifier.deleteArtifact("org.apache.maven.it0099", "maven-it0099-parent", "1", "pom");
|
||||
verifier.executeGoal("package");
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
System.out.println("PASS");
|
||||
}}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue