mirror of https://github.com/apache/maven.git
Added code to assembleLineage(..) in DefaultMavenProjectBuilder that enforces the rule that parent POMs should have packaging == 'pom'.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@345313 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9584088c44
commit
f936cfd675
|
@ -971,7 +971,7 @@ public class DefaultMavenProjectBuilder
|
||||||
|
|
||||||
if ( model != null && !"pom".equals( model.getPackaging() ) )
|
if ( model != null && !"pom".equals( model.getPackaging() ) )
|
||||||
{
|
{
|
||||||
throw new ProjectBuildingException( projectId, "Project's parent has wrong packaging: " + model.getPackaging() + ". Must be 'pom'." );
|
throw new ProjectBuildingException( projectId, "Parent: " + model.getId() + " of project: " + projectId + " has wrong packaging: " + model.getPackaging() + ". Must be 'pom'." );
|
||||||
}
|
}
|
||||||
|
|
||||||
File parentProjectDir = null;
|
File parentProjectDir = null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p0</name>
|
<name>p0</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<organization>
|
<organization>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p1</name>
|
<name>p1</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<scm>
|
<scm>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p2</artifactId>
|
<artifactId>p2</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p2</name>
|
<name>p2</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<mailingLists>
|
<mailingLists>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p3</artifactId>
|
<artifactId>p3</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p3</name>
|
<name>p3</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<inceptionYear>2000</inceptionYear>
|
<inceptionYear>2000</inceptionYear>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p0</artifactId>
|
<artifactId>p0</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p0</name>
|
<name>p0</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<organization>
|
<organization>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p1</artifactId>
|
<artifactId>p1</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p1</name>
|
<name>p1</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<organization>
|
<organization>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p2</artifactId>
|
<artifactId>p2</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p2</name>
|
<name>p2</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<organization>
|
<organization>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>maven</groupId>
|
<groupId>maven</groupId>
|
||||||
<artifactId>p3</artifactId>
|
<artifactId>p3</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>p3</name>
|
<name>p3</name>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<organization>
|
<organization>
|
||||||
|
|
Loading…
Reference in New Issue