mirror of https://github.com/apache/maven.git
IT for MNG-2277
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@589460 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
09ccac6123
commit
e7560ec488
|
@ -141,7 +141,7 @@ public class IntegrationTestSuite
|
||||||
suite.addTestSuite( MavenIT0087Test.class );
|
suite.addTestSuite( MavenIT0087Test.class );
|
||||||
suite.addTestSuite( MavenIT0088Test.class );
|
suite.addTestSuite( MavenIT0088Test.class );
|
||||||
suite.addTestSuite( MavenIT0089Test.class );
|
suite.addTestSuite( MavenIT0089Test.class );
|
||||||
suite.addTestSuite(MavenIT0090Test.class);
|
suite.addTestSuite( MavenIT0090Test.class);
|
||||||
suite.addTestSuite( MavenIT0092Test.class );
|
suite.addTestSuite( MavenIT0092Test.class );
|
||||||
suite.addTestSuite( MavenIT0094Test.class );
|
suite.addTestSuite( MavenIT0094Test.class );
|
||||||
suite.addTestSuite( MavenIT0095Test.class );
|
suite.addTestSuite( MavenIT0095Test.class );
|
||||||
|
@ -162,6 +162,7 @@ public class IntegrationTestSuite
|
||||||
suite.addTestSuite( MavenITmng2254PomEncodingTest.class);
|
suite.addTestSuite( MavenITmng2254PomEncodingTest.class);
|
||||||
suite.addTestSuite( MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.class );
|
suite.addTestSuite( MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.class );
|
||||||
suite.addTestSuite( MavenITmng2045testJarDependenciesBrokenInReactorTest.class);
|
suite.addTestSuite( MavenITmng2045testJarDependenciesBrokenInReactorTest.class);
|
||||||
|
suite.addTestSuite( MavenITmng2277AggregatorAndResolutionPluginsTest.class);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------------
|
||||||
// Tests that need to be fixed.
|
// Tests that need to be fixed.
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package org.apache.maven.integrationtests;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
|
||||||
|
import org.apache.maven.it.Verifier;
|
||||||
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class MavenITmng2277AggregatorAndResolutionPluginsTest
|
||||||
|
extends AbstractMavenIntegrationTestCase
|
||||||
|
{
|
||||||
|
public void testitMNG2277 ()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
// The testdir is computed from the location of this
|
||||||
|
// file.
|
||||||
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng2277aggregatorPlugins" );
|
||||||
|
|
||||||
|
Verifier verifier;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We must first make sure that any artifact created
|
||||||
|
* by this test has been removed from the local
|
||||||
|
* repository. Failing to do this could cause
|
||||||
|
* unstable test results. Fortunately, the verifier
|
||||||
|
* makes it easy to do this.
|
||||||
|
*/
|
||||||
|
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.deleteArtifact( "org.apache.maven.its.mng2277", "parent", "1.0", "pom" );
|
||||||
|
verifier.deleteArtifact( "org.apache.maven.its.mng2277", "test", "1.0", "jar" );
|
||||||
|
verifier.deleteArtifact( "org.apache.maven.its.mng2277", "assembly", "1.0", "jar" );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The Command Line Options (CLI) are passed to the
|
||||||
|
* verifier as a list. This is handy for things like
|
||||||
|
* redefining the local repository if needed. In
|
||||||
|
* this case, we use the -N flag so that Maven won't
|
||||||
|
* recurse. We are only installing the parent pom to
|
||||||
|
* the local repo here.
|
||||||
|
*/
|
||||||
|
List cliOptions = new ArrayList();
|
||||||
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-all:aggregator-dependencies" );
|
||||||
|
|
||||||
|
verifier.verifyErrorFreeLog();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.mng2277</groupId>
|
||||||
|
<artifactId>parent</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</parent>
|
||||||
|
<name>assembly</name>
|
||||||
|
<artifactId>assembly</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</project>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.apache.maven.its.mng2277</groupId>
|
||||||
|
<artifactId>parent</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0</version>
|
||||||
|
<name>MNG-2277</name>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>assembly</module>
|
||||||
|
<module>test</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
|
@ -0,0 +1,2 @@
|
||||||
|
This test checks that Maven doesn't crash when a plugin that has both @aggregator and @requiresDependencyResolution is run on a new project with sibling dependencies.
|
||||||
|
See MNG-2277
|
|
@ -0,0 +1,17 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.mng2277</groupId>
|
||||||
|
<artifactId>parent</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>test</artifactId>
|
||||||
|
<name>Test</name>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.its.mng2277</groupId>
|
||||||
|
<artifactId>assembly</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,9 @@
|
||||||
|
public class Class
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
System.out.println("hello");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue