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:
John Dennis Casey 2005-11-17 19:31:33 +00:00
parent 9584088c44
commit f936cfd675
9 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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