views:

42

answers:

2

Is it possible for a child POM to inherit profiles defined in the parent POM? If so, how?

+1  A: 

It's not just possible, it's mandatory. If you declare a parent POM, you get all its profiles.

bmargulies
+3  A: 

Profiles defined in a parent POM are inherited in a child POM extending the parent, there is nothing to do. And just in case, the Maven Help Plugin has very useful goals allowing to deal with profiles:

Pascal Thivent
It was sort of an add-on to your answer (an example), not really an answer in its own right. Then I realized I had misread the OP question.
Justin
@Justin Ok, got it now :)
Pascal Thivent
The only probmlem, that in child profiles the help:active-profiles do not show inherited profile, which is misleading I think.
Gábor Lipták