mirror of https://github.com/apache/maven.git
Fix unit tests.
The order of the tests is important since the same groupId/artifactId/version combinations are used in different local repositories in the tests, containing different poms. The DefaultMavenProjectBuilder caches models with g🅰️v, so it can serve a model from another local repo. Solved this by changing groupId's in the poms and repositories so they don't conflict. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@513720 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ddabf5a2d
commit
cd8c1d61a2
|
@ -39,7 +39,12 @@ public abstract class AbstractProjectInheritanceTestCase
|
||||||
|
|
||||||
protected File projectFile( String name )
|
protected File projectFile( String name )
|
||||||
{
|
{
|
||||||
return new File( getLocalRepositoryPath(), "/maven/poms/" + name + "-1.0.pom" );
|
return projectFile( "maven", name );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected File projectFile( String groupId, String artifactId )
|
||||||
|
{
|
||||||
|
return new File( getLocalRepositoryPath(), "/" + groupId + "/poms/" + artifactId + "-1.0.pom" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class ProjectInheritanceTest
|
||||||
// Check p0 value for org name
|
// Check p0 value for org name
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
MavenProject p0 = getProject( projectFile( "p0" ) );
|
MavenProject p0 = getProject( projectFile( "maven.t01", "p0" ) );
|
||||||
|
|
||||||
assertEquals( "p0-org", p0.getOrganization().getName() );
|
assertEquals( "p0-org", p0.getOrganization().getName() );
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class ProjectInheritanceTest
|
||||||
// Check p1 value for org name
|
// Check p1 value for org name
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
MavenProject p1 = getProject( projectFile( "p1" ) );
|
MavenProject p1 = getProject( projectFile( "maven.t01", "p1" ) );
|
||||||
|
|
||||||
assertEquals( "p1-org", p1.getOrganization().getName() );
|
assertEquals( "p1-org", p1.getOrganization().getName() );
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class ProjectInheritanceTest
|
||||||
// Check p2 value for org name
|
// Check p2 value for org name
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
MavenProject p2 = getProject( projectFile( "p2" ) );
|
MavenProject p2 = getProject( projectFile( "maven.t01", "p2" ) );
|
||||||
|
|
||||||
assertEquals( "p2-org", p2.getOrganization().getName() );
|
assertEquals( "p2-org", p2.getOrganization().getName() );
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public class ProjectInheritanceTest
|
||||||
// Check p2 value for org name
|
// Check p2 value for org name
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
MavenProject p3 = getProject( projectFile( "p3" ) );
|
MavenProject p3 = getProject( projectFile( "maven.t01", "p3" ) );
|
||||||
|
|
||||||
assertEquals( "p3-org", p3.getOrganization().getName() );
|
assertEquals( "p3-org", p3.getOrganization().getName() );
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ public class ProjectInheritanceTest
|
||||||
// Check p4 value for org name
|
// Check p4 value for org name
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
MavenProject p4 = getProject( projectFile( "p4" ) );
|
MavenProject p4 = getProject( projectFile( "maven.t01", "p4" ) );
|
||||||
|
|
||||||
assertEquals( "p4-org", p4.getOrganization().getName() );
|
assertEquals( "p4-org", p4.getOrganization().getName() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<project>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p0</name>
|
<name>p0</name>
|
||||||
|
@ -8,4 +8,4 @@
|
||||||
<organization>
|
<organization>
|
||||||
<name>p0-org</name>
|
<name>p0-org</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
|
@ -1,11 +1,11 @@
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p1</name>
|
<name>p1</name>
|
||||||
|
@ -13,4 +13,4 @@
|
||||||
<organization>
|
<organization>
|
||||||
<name>p1-org</name>
|
<name>p1-org</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
|
@ -1,11 +1,11 @@
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<artifactId>p2</artifactId>
|
<artifactId>p2</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p2</name>
|
<name>p2</name>
|
||||||
|
@ -13,4 +13,4 @@
|
||||||
<organization>
|
<organization>
|
||||||
<name>p2-org</name>
|
<name>p2-org</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
|
@ -1,11 +1,11 @@
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p2</artifactId>
|
<artifactId>p2</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<artifactId>p3</artifactId>
|
<artifactId>p3</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p3</name>
|
<name>p3</name>
|
||||||
|
@ -13,4 +13,4 @@
|
||||||
<organization>
|
<organization>
|
||||||
<name>p3-org</name>
|
<name>p3-org</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
|
@ -1,11 +1,11 @@
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p3</artifactId>
|
<artifactId>p3</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t01</groupId>
|
||||||
<artifactId>p4</artifactId>
|
<artifactId>p4</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>p4</name>
|
<name>p4</name>
|
||||||
|
@ -13,4 +13,4 @@
|
||||||
<organization>
|
<organization>
|
||||||
<name>p4-org</name>
|
<name>p4-org</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
|
@ -20,13 +20,13 @@ under the License.
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p4</artifactId>
|
<artifactId>p4</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<artifactId>p5</artifactId>
|
<artifactId>p5</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>p5</name>
|
<name>p5</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,13 +20,13 @@ under the License.
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p3</artifactId>
|
<artifactId>p3</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<artifactId>p4</artifactId>
|
<artifactId>p4</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>p4</name>
|
<name>p4</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,14 +20,14 @@ under the License.
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p2</artifactId>
|
<artifactId>p2</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<artifactId>p3</artifactId>
|
<artifactId>p3</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p3</name>
|
<name>p3</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<inceptionYear>2000</inceptionYear>
|
<inceptionYear>2000</inceptionYear>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,11 +20,11 @@ under the License.
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<artifactId>p2</artifactId>
|
<artifactId>p2</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p2</name>
|
<name>p2</name>
|
||||||
|
@ -34,4 +34,4 @@ under the License.
|
||||||
<name>mailing-list</name>
|
<name>mailing-list</name>
|
||||||
</mailingList>
|
</mailingList>
|
||||||
</mailingLists>
|
</mailingLists>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,11 +20,11 @@ under the License.
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p1</name>
|
<name>p1</name>
|
||||||
|
@ -48,4 +48,4 @@ under the License.
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -19,7 +19,7 @@ under the License.
|
||||||
|
|
||||||
<project>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t02</groupId>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p0</name>
|
<name>p0</name>
|
||||||
|
@ -27,4 +27,4 @@ under the License.
|
||||||
<organization>
|
<organization>
|
||||||
<name>Codehaus</name>
|
<name>Codehaus</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,11 +20,11 @@ under the License.
|
||||||
<project>
|
<project>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t03</groupId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t03</groupId>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p1</name>
|
<name>p1</name>
|
||||||
|
@ -42,4 +42,4 @@ under the License.
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -19,7 +19,7 @@ under the License.
|
||||||
|
|
||||||
<project>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven.t03</groupId>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p0</name>
|
<name>p0</name>
|
||||||
|
@ -27,4 +27,4 @@ under the License.
|
||||||
<organization>
|
<organization>
|
||||||
<name>Codehaus</name>
|
<name>Codehaus</name>
|
||||||
</organization>
|
</organization>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue