[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:
John Dennis Casey 2008-02-06 22:06:12 +00:00
parent 1e96cc746a
commit b182611984
6 changed files with 69 additions and 0 deletions

View File

@ -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;
}

View File

@ -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.
}
}
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1 @@
Check to make sure the build fails when two projects' artifactIds collide inside the reactor.