From 38f6918d1b7e11ae35b967b71992fd70ea1e3f53 Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Thu, 24 Jul 2008 17:47:23 +0000 Subject: [PATCH] [MNG-3679] Adding integration test, and enabling integration tests of two other previously fixed issues. git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@679473 13f79535-47bb-0310-9956-ffa450edef68 --- .../IntegrationTestSuite.java | 5 ++- ...Tmng3679PluginExecIdInterpolationTest.java | 31 ++++++++++++++++ .../.classpath | 6 +++ .../.project | 23 ++++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 5 +++ .../.settings/org.maven.ide.eclipse.prefs | 8 ++++ .../pom.xml | 37 +++++++++++++++++++ .../target/sanity-check.txt | 1 + 8 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3679PluginExecIdInterpolationTest.java create mode 100644 its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.classpath create mode 100644 its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.project create mode 100644 its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.eclipse.jdt.core.prefs create mode 100644 its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.maven.ide.eclipse.prefs create mode 100644 its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/pom.xml create mode 100644 its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/target/sanity-check.txt diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java index 263dc98f8b..3f6bfdf807 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java @@ -64,7 +64,10 @@ public static Test suite() * the tests are to finishing. Newer tests are also more likely to fail, so this is * a fail fast technique as well. */ - + + suite.addTestSuite( MavenITmng3679PluginExecIdInterpolationTest.class ); + suite.addTestSuite( MavenITmng3671PluginLevelDepInterpolationTest.class ); + suite.addTestSuite( MavenITmng3667ResolveDepsWithBadPomVersionTest.class ); suite.addTestSuite( MavenITmng3652UserAgentHeader.class ); suite.addTestSuite( MavenITmng3642DynamicResourcesTest.class ); suite.addTestSuite( MavenITmng3581PluginUsesWagonDependency.class ); diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3679PluginExecIdInterpolationTest.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3679PluginExecIdInterpolationTest.java new file mode 100644 index 0000000000..e776c11094 --- /dev/null +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3679PluginExecIdInterpolationTest.java @@ -0,0 +1,31 @@ +package org.apache.maven.integrationtests; + +import java.io.File; + +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +/** + * Checks that a plugin execution with an id that contains an expression will + * still execute without a problem. + * + * @author jdcasey + */ +public class MavenITmng3679PluginExecIdInterpolationTest + extends AbstractMavenIntegrationTestCase +{ + public void testitMNG3679 () + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3679-pluginExecIdInterpolation" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + + verifier.executeGoal( "validate" ); + + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + assertTrue( new File( testDir, "target/check.txt" ).exists() ); + } +} diff --git a/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.classpath b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.classpath new file mode 100644 index 0000000000..a225f00dbd --- /dev/null +++ b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.project b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.project new file mode 100644 index 0000000000..04c4fe97eb --- /dev/null +++ b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.project @@ -0,0 +1,23 @@ + + + mng-3679-pluginExecIdInterpolation + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.maven.ide.eclipse.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.maven.ide.eclipse.maven2Nature + + diff --git a/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.eclipse.jdt.core.prefs b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..02215408ed --- /dev/null +++ b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +#Thu Jul 24 12:57:19 EDT 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.source=1.3 diff --git a/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.maven.ide.eclipse.prefs b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 0000000000..f39382bfbd --- /dev/null +++ b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,8 @@ +#Thu Jul 24 12:57:46 EDT 2008 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=true +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +version=1 diff --git a/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/pom.xml b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/pom.xml new file mode 100644 index 0000000000..9814c8cb6b --- /dev/null +++ b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + test + mng-3679-pluginExecIdInterpolation + pom + + 1 + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.1 + + + ${myExecId} + validate + + run + + + + + ${myExecId} + + + + + + + + + test-id + + \ No newline at end of file diff --git a/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/target/sanity-check.txt b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/target/sanity-check.txt new file mode 100644 index 0000000000..6fdc0cc1ae --- /dev/null +++ b/its/core-integration-tests/src/test/resources/mng-3679-pluginExecIdInterpolation/target/sanity-check.txt @@ -0,0 +1 @@ +Testing execution with id: test-id\n \ No newline at end of file