...">

Is it possible to "expand" a profile in a child module?

let's say I have a parent pom A, with win32 and win64 profiles 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> 

these profiles define env. variables like $ {envClassifier} etc. let's say that the parent module has a child module B that would like to define some additional IN ADDITION things on win64:

 <profile> <id>windows64</id> <properties> <jreName>jre6u27.zip</jreName> </properties> </profile> 

Is there any way to extend the win64 profile from the parent, or am I doomed to copy and paste it along with its activation section and all?

+8
java maven
source share
2 answers

apparently just impossible. I found a good explanation here - http://www.dashbay.com/2011/03/maven-profile-inheritance/

+3
source share

I just checked this case using mvn help: effective-pom .

If you specify the <activation> section for the child profile in the same way as for the parent profile, the properties of the two profiles will be merged.

+6
source share

All Articles