[MNG-4040] - Profile module inheritance.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@745219 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-02-17 19:54:35 +00:00
parent fd1d9855df
commit 920e6b7f39
5 changed files with 41 additions and 1 deletions

View File

@ -1002,7 +1002,7 @@ public class ProjectUri
}
}
public static String modules = "http://apache.org/maven/project/profiles#collection/profile/modules";
public static String modules = "http://apache.org/maven/project/profiles#collection/profile/modules#collection";
public static class Repositories
{

View File

@ -307,6 +307,7 @@ public final class PomClassicDomainModel
s.add(ProjectUri.Reporting.Plugins.Plugin.ReportSets.ReportSet.configuration);
s.add(ProjectUri.Build.Plugins.Plugin.Executions.Execution.configuration);
//TODO: More profile info
s.add(ProjectUri.Profiles.Profile.modules);
s.add(ProjectUri.Profiles.Profile.Dependencies.xUri);
s.add(ProjectUri.Profiles.Profile.Dependencies.Dependency.Exclusions.xUri);
s.add(ProjectUri.Profiles.Profile.Build.Plugins.Plugin.configuration);

View File

@ -846,6 +846,15 @@ public class PomConstructionTest
}
//*/
/** MNG-4040 */
public void testProfileModuleInheritance()
throws Exception
{
PomTestWrapper pom = this.buildPomFromMavenProject( "profile-module-inheritance/sub", "dist" );
assertEquals(0, ( (List<?>) pom.getValue( "modules" ) ).size());
}
private void assertPathWithNormalizedFileSeparators( Object value )
{
assertEquals( new File( value.toString() ).getPath(), value.toString() );

View File

@ -0,0 +1,18 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.ops4j.pax</groupId>
<artifactId>construct</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>dist</id>
<modules>
<module>maven-inherit-plugin</module>
<module>maven-pax-plugin</module>
</modules>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,12 @@
<project>
<parent>
<groupId>org.ops4j.pax</groupId>
<artifactId>construct</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.ops4j</groupId>
<artifactId>maven-inherit-plugin</artifactId>
<version>1.1</version>
</project>