mirror of https://github.com/apache/maven.git
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:
parent
a6a01793d8
commit
83d67e6f81
|
@ -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>
|
||||
|
|
|
@ -8,4 +8,10 @@
|
|||
|
||||
<artifactId>project-sub1</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-artifact-manager</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue