mirror of https://github.com/apache/maven.git
[MNG-1491] Add an integration test to verify that a build error happens when two projects' artifactId's collide in the reactor.
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@619178 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e96cc746a
commit
b182611984
|
@ -190,6 +190,7 @@ public class IntegrationTestSuite
|
|||
suite.addTestSuite( MavenITmng3099SettingsProfilesWithNoPOM.class );
|
||||
suite.addTestSuite( MavenITmng3331ModulePathNormalization.class );
|
||||
suite.addTestSuite( MavenITmng1493NonStandardModulePomNames.class );
|
||||
suite.addTestSuite( MavenITmng1491ReactorArtifactIdCollision.class );
|
||||
// suite.addTestSuite( MavenIT0120EjbClientDependency.class ); -- not passing for 2.0.7 either, looks to be 2.1+ ?
|
||||
return suite;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
import org.apache.maven.it.VerificationException;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MavenITmng1491ReactorArtifactIdCollision
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
public void testitMNG1491 ()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-1491-reactorArtifactIdCollision" );
|
||||
|
||||
Verifier verifier;
|
||||
|
||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
|
||||
try
|
||||
{
|
||||
verifier.executeGoal( "initialize" );
|
||||
|
||||
verifier.verifyErrorFreeLog();
|
||||
|
||||
fail( "Build should fail due to duplicate artifactId's in the reactor." );
|
||||
}
|
||||
catch( VerificationException e )
|
||||
{
|
||||
// expected.
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>org.apache.maven.its.mng1491</groupId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>child</artifactId>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>org.apache.maven.its.mng1491</groupId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>child</artifactId>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.mng1491</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1</version>
|
||||
|
||||
<modules>
|
||||
<module>child1</module>
|
||||
<module>child2</module>
|
||||
</modules>
|
||||
</project>
|
|
@ -0,0 +1 @@
|
|||
Check to make sure the build fails when two projects' artifactIds collide inside the reactor.
|
Loading…
Reference in New Issue