From fb93c0c26419a7534f79e4e316e26f93bc6f0fee Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 19 Oct 2006 20:22:23 +0000 Subject: [PATCH] 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 --- maven-core-integration-tests/pom.xml | 35 ++++++ .../IntegrationTestSuite.java | 117 ++++++++++++++++++ .../integrationtests/MavenIT0000Test.java | 32 +++++ .../integrationtests/MavenIT0001Test.java | 30 +++++ .../integrationtests/MavenIT0002Test.java | 33 +++++ .../integrationtests/MavenIT0003Test.java | 33 +++++ .../integrationtests/MavenIT0004Test.java | 29 +++++ .../integrationtests/MavenIT0005Test.java | 28 +++++ .../integrationtests/MavenIT0006Test.java | 25 ++++ .../integrationtests/MavenIT0007Test.java | 32 +++++ .../integrationtests/MavenIT0008Test.java | 32 +++++ .../integrationtests/MavenIT0009Test.java | 31 +++++ .../integrationtests/MavenIT0010Test.java | 33 +++++ .../integrationtests/MavenIT0011Test.java | 26 ++++ .../integrationtests/MavenIT0012Test.java | 27 ++++ .../integrationtests/MavenIT0013Test.java | 31 +++++ .../integrationtests/MavenIT0014Test.java | 27 ++++ .../integrationtests/MavenIT0016Test.java | 34 +++++ .../integrationtests/MavenIT0017Test.java | 29 +++++ .../integrationtests/MavenIT0018Test.java | 30 +++++ .../integrationtests/MavenIT0019Test.java | 26 ++++ .../integrationtests/MavenIT0020Test.java | 29 +++++ .../integrationtests/MavenIT0021Test.java | 31 +++++ .../integrationtests/MavenIT0022Test.java | 30 +++++ .../integrationtests/MavenIT0023Test.java | 30 +++++ .../integrationtests/MavenIT0024Test.java | 27 ++++ .../integrationtests/MavenIT0025Test.java | 27 ++++ .../integrationtests/MavenIT0026Test.java | 30 +++++ .../integrationtests/MavenIT0027Test.java | 28 +++++ .../integrationtests/MavenIT0028Test.java | 27 ++++ .../integrationtests/MavenIT0029Test.java | 28 +++++ .../integrationtests/MavenIT0030Test.java | 31 +++++ .../integrationtests/MavenIT0031Test.java | 36 ++++++ .../integrationtests/MavenIT0032Test.java | 29 +++++ .../integrationtests/MavenIT0033Test.java | 28 +++++ .../integrationtests/MavenIT0034Test.java | 29 +++++ .../integrationtests/MavenIT0035Test.java | 31 +++++ .../integrationtests/MavenIT0036Test.java | 26 ++++ .../integrationtests/MavenIT0037Test.java | 29 +++++ .../integrationtests/MavenIT0038Test.java | 30 +++++ .../integrationtests/MavenIT0039Test.java | 34 +++++ .../integrationtests/MavenIT0040Test.java | 26 ++++ .../integrationtests/MavenIT0041Test.java | 29 +++++ .../integrationtests/MavenIT0042Test.java | 31 +++++ .../integrationtests/MavenIT0043Test.java | 26 ++++ .../integrationtests/MavenIT0044Test.java | 29 +++++ .../integrationtests/MavenIT0045Test.java | 31 +++++ .../integrationtests/MavenIT0046Test.java | 33 +++++ .../integrationtests/MavenIT0047Test.java | 27 ++++ .../integrationtests/MavenIT0048Test.java | 27 ++++ .../integrationtests/MavenIT0049Test.java | 27 ++++ .../integrationtests/MavenIT0050Test.java | 27 ++++ .../integrationtests/MavenIT0051Test.java | 30 +++++ .../integrationtests/MavenIT0052Test.java | 31 +++++ .../integrationtests/MavenIT0053Test.java | 32 +++++ .../integrationtests/MavenIT0054Test.java | 29 +++++ .../integrationtests/MavenIT0055Test.java | 30 +++++ .../integrationtests/MavenIT0056Test.java | 32 +++++ .../integrationtests/MavenIT0057Test.java | 29 +++++ .../integrationtests/MavenIT0058Test.java | 30 +++++ .../integrationtests/MavenIT0059Test.java | 30 +++++ .../integrationtests/MavenIT0060Test.java | 31 +++++ .../integrationtests/MavenIT0061Test.java | 29 +++++ .../integrationtests/MavenIT0062Test.java | 29 +++++ .../integrationtests/MavenIT0063Test.java | 29 +++++ .../integrationtests/MavenIT0064Test.java | 29 +++++ .../integrationtests/MavenIT0065Test.java | 28 +++++ .../integrationtests/MavenIT0066Test.java | 29 +++++ .../integrationtests/MavenIT0067Test.java | 30 +++++ .../integrationtests/MavenIT0068Test.java | 30 +++++ .../integrationtests/MavenIT0069Test.java | 29 +++++ .../integrationtests/MavenIT0070Test.java | 28 +++++ .../integrationtests/MavenIT0071Test.java | 28 +++++ .../integrationtests/MavenIT0072Test.java | 27 ++++ .../integrationtests/MavenIT0073Test.java | 28 +++++ .../integrationtests/MavenIT0074Test.java | 27 ++++ .../integrationtests/MavenIT0075Test.java | 34 +++++ .../integrationtests/MavenIT0076Test.java | 27 ++++ .../integrationtests/MavenIT0077Test.java | 30 +++++ .../integrationtests/MavenIT0078Test.java | 28 +++++ .../integrationtests/MavenIT0079Test.java | 28 +++++ .../integrationtests/MavenIT0080Test.java | 33 +++++ .../integrationtests/MavenIT0081Test.java | 26 ++++ .../integrationtests/MavenIT0082Test.java | 27 ++++ .../integrationtests/MavenIT0083Test.java | 31 +++++ .../integrationtests/MavenIT0084Test.java | 37 ++++++ .../integrationtests/MavenIT0085Test.java | 31 +++++ .../integrationtests/MavenIT0086Test.java | 27 ++++ .../integrationtests/MavenIT0087Test.java | 27 ++++ .../integrationtests/MavenIT0088Test.java | 27 ++++ .../integrationtests/MavenIT0089Test.java | 29 +++++ .../integrationtests/MavenIT0090Test.java | 27 ++++ .../integrationtests/MavenIT0091Test.java | 28 +++++ .../integrationtests/MavenIT0092Test.java | 27 ++++ .../integrationtests/MavenIT0094Test.java | 25 ++++ .../integrationtests/MavenIT0095Test.java | 25 ++++ .../integrationtests/MavenIT0096Test.java | 25 ++++ .../integrationtests/MavenIT0097Test.java | 28 +++++ .../integrationtests/MavenIT0098Test.java | 29 +++++ .../integrationtests/MavenIT0099Test.java | 27 ++++ .../integrationtests/MavenIT0100Test.java | 25 ++++ .../integrationtests/MavenIT0101Test.java | 30 +++++ .../integrationtests/MavenIT0102Test.java | 26 ++++ .../integrationtests/MavenIT0103Test.java | 27 ++++ .../integrationtests/MavenIT0104Test.java | 27 ++++ .../integrationtests/MavenIT0105Test.java | 29 +++++ .../integrationtests/MavenIT0106Test.java | 25 ++++ .../integrationtests/MavenIT0107Test.java | 29 +++++ 108 files changed, 3228 insertions(+) create mode 100644 maven-core-integration-tests/pom.xml create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0000Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0001Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0002Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0003Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0004Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0005Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0006Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0007Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0008Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0009Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0010Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0011Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0012Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0013Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0014Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0016Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0017Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0018Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0019Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0020Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0021Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0022Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0023Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0024Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0025Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0026Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0027Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0028Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0029Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0030Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0031Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0032Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0033Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0034Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0035Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0036Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0037Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0038Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0039Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0040Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0041Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0042Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0044Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0045Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0046Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0047Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0048Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0049Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0050Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0051Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0052Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0053Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0054Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0055Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0056Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0057Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0058Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0059Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0060Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0061Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0062Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0063Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0064Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0065Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0066Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0067Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0068Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0069Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0070Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0071Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0072Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0073Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0074Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0075Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0076Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0077Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0078Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0079Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0080Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0081Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0082Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0083Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0084Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0085Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0086Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0087Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0088Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0089Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0090Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0091Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0092Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0094Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0096Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0097Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0098Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0099Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0101Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0103Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0104Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0105Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0106Test.java create mode 100644 maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0107Test.java diff --git a/maven-core-integration-tests/pom.xml b/maven-core-integration-tests/pom.xml new file mode 100644 index 0000000000..45fb20d092 --- /dev/null +++ b/maven-core-integration-tests/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + org.apache.maven.integrationtests + maven-core-integrationtests + 1.0-SNAPSHOT + Maven Integration Tests + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/IntegrationTestSuite.java + + never + + + + + + + org.apache.maven.shared + maven-verifier + 1.0-SNAPSHOT + + + junit + junit + 3.8.1 + test + + + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java new file mode 100644 index 0000000000..968f70c6f0 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java @@ -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; + } +} diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0000Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0000Test.java new file mode 100644 index 0000000000..fefb7d5331 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0000Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0001Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0001Test.java new file mode 100644 index 0000000000..9048d1d417 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0001Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0002Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0002Test.java new file mode 100644 index 0000000000..4e80f276a7 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0002Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0003Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0003Test.java new file mode 100644 index 0000000000..aa926f45c8 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0003Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0004Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0004Test.java new file mode 100644 index 0000000000..94b0dff61d --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0004Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0005Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0005Test.java new file mode 100644 index 0000000000..8c66eda350 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0005Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0006Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0006Test.java new file mode 100644 index 0000000000..5fe4395ded --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0006Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0007Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0007Test.java new file mode 100644 index 0000000000..c4982febf6 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0007Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0008Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0008Test.java new file mode 100644 index 0000000000..0103dc8430 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0008Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0009Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0009Test.java new file mode 100644 index 0000000000..fd07f388c2 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0009Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0010Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0010Test.java new file mode 100644 index 0000000000..b7e8c61fb0 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0010Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0011Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0011Test.java new file mode 100644 index 0000000000..c3fac9a939 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0011Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0012Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0012Test.java new file mode 100644 index 0000000000..2bf4ace7c9 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0012Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0013Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0013Test.java new file mode 100644 index 0000000000..ff26111155 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0013Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0014Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0014Test.java new file mode 100644 index 0000000000..f3c4b73171 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0014Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0016Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0016Test.java new file mode 100644 index 0000000000..53effaf050 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0016Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0017Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0017Test.java new file mode 100644 index 0000000000..306ea39482 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0017Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0018Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0018Test.java new file mode 100644 index 0000000000..597c566d98 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0018Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0019Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0019Test.java new file mode 100644 index 0000000000..e783211ef4 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0019Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0020Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0020Test.java new file mode 100644 index 0000000000..2627c6c8a8 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0020Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0021Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0021Test.java new file mode 100644 index 0000000000..5c74f619df --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0021Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0022Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0022Test.java new file mode 100644 index 0000000000..db6c2f0dfc --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0022Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0023Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0023Test.java new file mode 100644 index 0000000000..8536f24870 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0023Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0024Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0024Test.java new file mode 100644 index 0000000000..4688969363 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0024Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0025Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0025Test.java new file mode 100644 index 0000000000..3e5f2f0578 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0025Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0026Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0026Test.java new file mode 100644 index 0000000000..54d4118f78 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0026Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0027Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0027Test.java new file mode 100644 index 0000000000..1d38cece7a --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0027Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0028Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0028Test.java new file mode 100644 index 0000000000..2bfbb6df97 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0028Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0029Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0029Test.java new file mode 100644 index 0000000000..65d97bf124 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0029Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0030Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0030Test.java new file mode 100644 index 0000000000..37e8a45d14 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0030Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0031Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0031Test.java new file mode 100644 index 0000000000..69ee8de57c --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0031Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0032Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0032Test.java new file mode 100644 index 0000000000..358cdbccac --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0032Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0033Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0033Test.java new file mode 100644 index 0000000000..71dbcb6e6e --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0033Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0034Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0034Test.java new file mode 100644 index 0000000000..63a5c40da1 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0034Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0035Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0035Test.java new file mode 100644 index 0000000000..5b730166e6 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0035Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0036Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0036Test.java new file mode 100644 index 0000000000..e990f84224 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0036Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0037Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0037Test.java new file mode 100644 index 0000000000..a491a3f6f9 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0037Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0038Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0038Test.java new file mode 100644 index 0000000000..6024a6523f --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0038Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0039Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0039Test.java new file mode 100644 index 0000000000..58c1dc02b4 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0039Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0040Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0040Test.java new file mode 100644 index 0000000000..3ed1872466 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0040Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0041Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0041Test.java new file mode 100644 index 0000000000..ad8bda4921 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0041Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0042Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0042Test.java new file mode 100644 index 0000000000..627b9a8010 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0042Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java new file mode 100644 index 0000000000..52819518e0 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0044Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0044Test.java new file mode 100644 index 0000000000..283e04a4a2 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0044Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0045Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0045Test.java new file mode 100644 index 0000000000..05fe9ec3ea --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0045Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0046Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0046Test.java new file mode 100644 index 0000000000..8a8edf35de --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0046Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0047Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0047Test.java new file mode 100644 index 0000000000..1bd49846c7 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0047Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0048Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0048Test.java new file mode 100644 index 0000000000..c6bed869ed --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0048Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0049Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0049Test.java new file mode 100644 index 0000000000..fa0e540861 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0049Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0050Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0050Test.java new file mode 100644 index 0000000000..0f74873be6 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0050Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0051Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0051Test.java new file mode 100644 index 0000000000..7f4a215219 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0051Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0052Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0052Test.java new file mode 100644 index 0000000000..93fbc03be0 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0052Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0053Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0053Test.java new file mode 100644 index 0000000000..0714b1728a --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0053Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0054Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0054Test.java new file mode 100644 index 0000000000..815ce5a8ef --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0054Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0055Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0055Test.java new file mode 100644 index 0000000000..11460b9ced --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0055Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0056Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0056Test.java new file mode 100644 index 0000000000..b31fdd7570 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0056Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0057Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0057Test.java new file mode 100644 index 0000000000..9e5bf33e98 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0057Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0058Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0058Test.java new file mode 100644 index 0000000000..530b320681 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0058Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0059Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0059Test.java new file mode 100644 index 0000000000..720e30b308 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0059Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0060Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0060Test.java new file mode 100644 index 0000000000..c7b6eecd75 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0060Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0061Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0061Test.java new file mode 100644 index 0000000000..cfe0085e64 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0061Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0062Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0062Test.java new file mode 100644 index 0000000000..46fc29657b --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0062Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0063Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0063Test.java new file mode 100644 index 0000000000..2e93046c48 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0063Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0064Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0064Test.java new file mode 100644 index 0000000000..8fe4f40ed7 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0064Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0065Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0065Test.java new file mode 100644 index 0000000000..f451ec7107 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0065Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0066Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0066Test.java new file mode 100644 index 0000000000..58dabf92d1 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0066Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0067Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0067Test.java new file mode 100644 index 0000000000..e0ff92a433 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0067Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0068Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0068Test.java new file mode 100644 index 0000000000..0fce873125 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0068Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0069Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0069Test.java new file mode 100644 index 0000000000..3229eb44d0 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0069Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0070Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0070Test.java new file mode 100644 index 0000000000..13f8382de4 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0070Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0071Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0071Test.java new file mode 100644 index 0000000000..bed5f3f113 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0071Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0072Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0072Test.java new file mode 100644 index 0000000000..c49ae5befe --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0072Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0073Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0073Test.java new file mode 100644 index 0000000000..1838a7b758 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0073Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0074Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0074Test.java new file mode 100644 index 0000000000..c9bbe41e0a --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0074Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0075Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0075Test.java new file mode 100644 index 0000000000..cff23b790b --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0075Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0076Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0076Test.java new file mode 100644 index 0000000000..2977030c96 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0076Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0077Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0077Test.java new file mode 100644 index 0000000000..4d056ebd9b --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0077Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0078Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0078Test.java new file mode 100644 index 0000000000..c599dd1551 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0078Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0079Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0079Test.java new file mode 100644 index 0000000000..ecf2f683e9 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0079Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0080Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0080Test.java new file mode 100644 index 0000000000..c869934ca2 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0080Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0081Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0081Test.java new file mode 100644 index 0000000000..578c264a3f --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0081Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0082Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0082Test.java new file mode 100644 index 0000000000..880e24a36a --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0082Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0083Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0083Test.java new file mode 100644 index 0000000000..aa9fc318cb --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0083Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0084Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0084Test.java new file mode 100644 index 0000000000..9f85f0172f --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0084Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0085Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0085Test.java new file mode 100644 index 0000000000..2087ad8bd6 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0085Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0086Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0086Test.java new file mode 100644 index 0000000000..77fc72f60f --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0086Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0087Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0087Test.java new file mode 100644 index 0000000000..d9178901d6 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0087Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0088Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0088Test.java new file mode 100644 index 0000000000..088a087a5f --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0088Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0089Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0089Test.java new file mode 100644 index 0000000000..e30eb3bb87 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0089Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0090Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0090Test.java new file mode 100644 index 0000000000..5ed8acbb0b --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0090Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0091Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0091Test.java new file mode 100644 index 0000000000..2ab49f4915 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0091Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0092Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0092Test.java new file mode 100644 index 0000000000..62a1909440 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0092Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0094Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0094Test.java new file mode 100644 index 0000000000..1d614eda0e --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0094Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java new file mode 100644 index 0000000000..df4c3e1249 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0096Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0096Test.java new file mode 100644 index 0000000000..32b4e3d687 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0096Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0097Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0097Test.java new file mode 100644 index 0000000000..8ec61534bf --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0097Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0098Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0098Test.java new file mode 100644 index 0000000000..0457035532 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0098Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0099Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0099Test.java new file mode 100644 index 0000000000..2053d92120 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0099Test.java @@ -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"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java new file mode 100644 index 0000000000..37acab3154 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java @@ -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 MavenIT0100Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** Test that ${parent.artifactId} resolves correctly. [MNG-2124] */ +public void testit0100() 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 it0100 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0100", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +verifier.executeGoal("verify"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0101Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0101Test.java new file mode 100644 index 0000000000..b4828f6468 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0101Test.java @@ -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 MavenIT0101Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** Test that properties defined in an active profile in the user's + settings are available for interpolation of systemPath in a dependency. + [MNG-2052] */ +public void testit0101() 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 it0101 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0101", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +List cliOptions = new ArrayList(); +cliOptions.add("--settings settings.xml"); +verifier.setCliOptions(cliOptions); +verifier.executeGoal("compile"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java new file mode 100644 index 0000000000..d790d495f2 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java @@ -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 MavenIT0102Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** Test that <activeByDefault/> calculations for profile activation only + use profiles defined in the POM. [MNG-2136] */ +public void testit0102() 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 it0102 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0102", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +verifier.executeGoal("verify"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0103Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0103Test.java new file mode 100644 index 0000000000..53e968a9d1 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0103Test.java @@ -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 MavenIT0103Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** Verify that multimodule builds where one project references another as + a parent can build, even if that parent is not correctly referenced by + <relativePath/> and is not in the local repository. [MNG-2196] */ +public void testit0103() 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 it0103 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0103", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +verifier.executeGoal("package"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0104Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0104Test.java new file mode 100644 index 0000000000..ae55131627 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0104Test.java @@ -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 MavenIT0104Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** Verify that plugin configurations are resolved correctly, particularly + when they contain ${project.build.directory} in the string value of a + Map.Entry. */ +public void testit0104() 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 it0104 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0104", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +verifier.executeGoal("test"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0105Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0105Test.java new file mode 100644 index 0000000000..0b4459f30e --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0105Test.java @@ -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 MavenIT0105Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** MRESOURCES-18 */ +public void testit0105() 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 it0105 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0105", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +List cliOptions = new ArrayList(); +cliOptions.add("-Dparam=PARAM"); +verifier.setCliOptions(cliOptions); +verifier.executeGoal("test"); +verifier.assertFilePresent("target/classes/test.properties"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0106Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0106Test.java new file mode 100644 index 0000000000..2adcee6fd6 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0106Test.java @@ -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 MavenIT0106Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** When a project has modules and its parent is not preinstalled [MNG-2318] */ +public void testit0106() 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 it0106 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0106", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +verifier.executeGoal("clean"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} + diff --git a/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0107Test.java b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0107Test.java new file mode 100644 index 0000000000..1e296a7030 --- /dev/null +++ b/maven-core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0107Test.java @@ -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 MavenIT0107Test extends TestCase /*extends AbstractMavenIntegrationTest*/ { + +/** Verify that default implementation of an implementation for a complex object works as + expected [MNG-2293] */ +public void testit0107() 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 it0107 to " + testDir.getAbsolutePath()); +ResourceExtractor.extractResourcePath(getClass(), "/it0107", testDir); +Verifier verifier = new Verifier(testDir.getAbsolutePath()); +List cliOptions = new ArrayList(); +cliOptions.add("-X"); +verifier.setCliOptions(cliOptions); +verifier.executeGoal("core-it:param-implementation"); +verifier.verifyErrorFreeLog(); +verifier.resetStreams(); +System.out.println("PASS"); +}} +