Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
1.4
-
None
-
None
-
Maven 3.2.2, JDK 7, Windows 7 64bit
Description
When having a POM project with modules, using the requireActiveProfile rule on one of the modules fails to resolve profiles that are inherited from the parent.
I've attached 2 POMs to reproduce the problem:
- parent project defines a profile called one and enforces it to be active
- submodule does nothing, just inherits both
When ran with -P one parameter we get on the submodule (not the parent pom, which works fine):
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireActiveProfile failed with message:
Profile "one" is not activated.
If we run mvn -P one help:active-profiles we can observe that the profile is effectively activated on the submodule:
Active Profiles for Project 'example:-maven-subproject:jar:0.0.1-SNAPSHOT':
The following profiles are active:
- default (source: external)
- one (source: example:test-maven-project:0.0.1-SNAPSHOT)
Attachments
Attachments
Issue Links
- duplicates
-
MENFORCER-257 RequireActiveProfile should respect inherited activated profiles
- Closed
- relates to
-
MPH-94 MavenProject.getActiveProfiles() does not merge active profiles from parent POMs
- Closed