Scenario:
- Given
- Parent POM which defines a profile and a child (as module)
- Child project(s) that will be using the profile by referring to the parent POM.
- The intent is to skip profile execution in the parent and execute it in the child only
- Profile has activation section
<activation><property><name>foo</name></property><activation>
- Since parent does not define
foo
property - the profile is inactive and will not be executed for the parent build - Now, I'm defining
<properties><foo>true</foo></properties>
in the child with hope that the property will be picked up when child build is executed and profile will be activated. No such luck. Profile is never activated, which tells me that property is never set. - Just to note:
mvn package -Dfoo=true
activates profile in both parent and child
Am I trying to do the impossible or just doing it wrong?
P.S. Hmmm - even if I define property in the parent, the profile is not triggered. What gives?