mirror of https://github.com/apache/maven.git
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
This commit is contained in:
parent
572a1a4be1
commit
a3127c6995
|
@ -1,15 +1,22 @@
|
||||||
package org.apache.maven.integrationtests;
|
package org.apache.maven.integrationtests;
|
||||||
|
|
||||||
import java.io.File;
|
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
|
||||||
import java.util.List;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.apache.maven.it.Verifier;
|
import org.apache.maven.it.Verifier;
|
||||||
import org.apache.maven.it.util.ResourceExtractor;
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MavenIT0114ExtensionThatProvidesResources
|
public class MavenIT0114ExtensionThatProvidesResources
|
||||||
extends AbstractMavenIntegrationTestCase
|
extends AbstractMavenIntegrationTestCase
|
||||||
{
|
{
|
||||||
|
public MavenIT0114ExtensionThatProvidesResources()
|
||||||
|
throws InvalidVersionSpecificationException
|
||||||
|
{
|
||||||
|
super( "[,2.1-SNAPSHOT)" );
|
||||||
|
}
|
||||||
|
|
||||||
public void testit0114()
|
public void testit0114()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue