From a3127c69955cb40c60d30b6d2d2b9f9c8d1f2c92 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Wed, 17 Oct 2007 18:20:57 +0000 Subject: [PATCH] o turn off the old crap way of using extensions for plugins and create a new test for pulling resources from actual plugin dependencies. we are now starting to limit extensions and start using these things properly. git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@585618 13f79535-47bb-0310-9956-ffa450edef68 --- ...nIT0114ExtensionThatProvidesResources.java | 15 +++++-- ...eProvidedToAPluginAsAPluginDependency.java | 43 +++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.java diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0114ExtensionThatProvidesResources.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0114ExtensionThatProvidesResources.java index 6b2cb256fb..9c8c2a2f0f 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0114ExtensionThatProvidesResources.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0114ExtensionThatProvidesResources.java @@ -1,15 +1,22 @@ package org.apache.maven.integrationtests; -import java.io.File; -import java.util.List; -import java.util.ArrayList; - +import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.it.Verifier; import org.apache.maven.it.util.ResourceExtractor; +import java.io.File; +import java.util.ArrayList; +import java.util.List; + public class MavenIT0114ExtensionThatProvidesResources extends AbstractMavenIntegrationTestCase { + public MavenIT0114ExtensionThatProvidesResources() + throws InvalidVersionSpecificationException + { + super( "[,2.1-SNAPSHOT)" ); + } + public void testit0114() throws Exception { diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.java new file mode 100644 index 0000000000..45f3ec3fc1 --- /dev/null +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.java @@ -0,0 +1,43 @@ +package org.apache.maven.integrationtests; + +import java.io.File; +import java.util.List; +import java.util.ArrayList; + +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +public class MavenIT0129ResourceProvidedToAPluginAsAPluginDependency + extends AbstractMavenIntegrationTestCase +{ + public void testit0114() + throws Exception + { + File testDir = + ResourceExtractor.simpleExtractResources( getClass(), "/it0129-extensionThatProvidesResources" ); + + Verifier verifier; + + // Install the parent POM, extension and the plugin + verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.deleteArtifact( "org.apache.maven.its.it0129", "it0129-plugin-runner", "1.0", "pom" ); + verifier.deleteArtifact( "org.apache.maven.its.it0129", "it0129-extension", "1.0", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0129", "it0129-plugin", "1.0", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0129", "it0129-parent", "1.0", "pom" ); + + List cliOptions = new ArrayList(); + verifier.executeGoal( "install" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + //now run the test + testDir = + ResourceExtractor.simpleExtractResources( getClass(), "/it0129-extensionThatProvidesResources/test-project" ); + verifier = new Verifier( testDir.getAbsolutePath() ); + cliOptions = new ArrayList(); + verifier.executeGoal( "verify" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + } +} \ No newline at end of file