say i have a parent pom A, with profiles win32 and win64 activated by os:
<profile>
<id>windows32</id>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<envClassifier>win-x32</envClassifier>
</properties>
</profile>
<profile>
<id>windows64</id>
<activation>
<os>
<family>windows</family>
<arch>amd64</arch>
</os>
</activation>
<properties>
<envClassifier>win-x64</envClassifier>
</properties>
</profile>
those profiles define env. variables like ${envClassifier} etc. say that parent module has a child module B which would like to define some extra stuff IN ADDITION on win64:
<profile>
<id>windows64</id>
<properties>
<jreName>jre6u27.zip</jreName>
</properties>
</profile>
can i somehow extend the win64 profile from the parent, or am i doomed to copy-and-paste it along with its activation section and everything?
apparently its simply impossible. i found a good explanation here - http://www.dashbay.com/2011/03/maven-profile-inheritance/
I just checked this case using mvn help:effective-pom.
Provided you specify <activation>
section for the child profile the same way as for the parent profile, properties of these 2 profiles will be merged.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With