Resolving: MNG-929

o Fixed DefaultMaven to use the release-pom.xml for MavenProjects loaded via <modules/> if the parent project is loaded from release-pom.xml

o Adjusted tests to have dependencyManagement.



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@290539 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-09-20 19:28:54 +00:00
parent a6a01793d8
commit 83d67e6f81
4 changed files with 43 additions and 9 deletions

View File

@ -68,6 +68,23 @@
</plugins>
</reporting>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0-beta-1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<profile>
<id>env-test</id>
@ -82,14 +99,6 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0-beta-1</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

View File

@ -8,4 +8,10 @@
<artifactId>project-sub1</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -14,6 +14,10 @@
<artifactId>project-sub1</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -337,9 +337,12 @@ public class DefaultMaven
{
File file = (File) iterator.next();
boolean usingReleasePom = false;
if ( RELEASE_POMv4.equals( file.getName() ) )
{
getLogger().info( "NOTE: Using release-pom: " + file + " in reactor build." );
usingReleasePom = true;
}
MavenProject project = getProject( file, localRepository, settings, globalProfileManager );
@ -366,7 +369,19 @@ public class DefaultMaven
for ( Iterator i = project.getModules().iterator(); i.hasNext(); )
{
String name = (String) i.next();
moduleFiles.add( new File( basedir, name + "/pom.xml" ) );
File moduleFile;
if ( usingReleasePom )
{
moduleFile = new File( basedir, name + "/" + Maven.RELEASE_POMv4 );
}
else
{
moduleFile = new File( basedir, name + "/" + Maven.POMv4 );
}
moduleFiles.add( moduleFile );
}
List collectedProjects = collectProjects( moduleFiles, localRepository, recursive, settings,