You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Jackman <Da...@fastsearch.com> on 2007/01/10 16:37:45 UTC
Profile inheritance
I've searched the mail archives, and this question seems to be asked a
lot and answered never.
Are profiles inherited from parent poms? The scant (and confusing) docs
seem to imply that they are, but doing a help:active-profiles command
does not agree with this.
Please someone explain how this is supposed to work.
..David..
FASTforward '07
The Industry's Largest Business &
Technology Conference Focused on Search
February 7th - 9th, San Diego, CA
www.fastforward07.com
Re: Profile inheritance
Posted by Arnaud Bailly <ab...@oqube.com>.
"David Jackman" <Da...@fastsearch.com> writes:
> Are profiles inherited from parent poms? The scant (and confusing) docs
> seem to imply that they are, but doing a help:active-profiles command
> does not agree with this.
>
> Please someone explain how this is supposed to work.
>
Hello,
As a follow-up to John Casey's post, I can tell that according to my
own experiences:
- profiles are not inherited per se (see JC's post) but their effects
are
- if you have profiles with the same id in several poms (and
settings.xml), they are all activated in their own poms when invoking
the build. Sort of method overloading ...
HTH,
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Profile inheritance
Posted by John Casey <ca...@gmail.com>.
Profiles are not inherited, period.
Now, having said that, profiles in parent POMs can be triggered by the
building of a child. When activated, they are applied directly to the parent
POM, prior to that parent being used for inheritance into the child. So, the
effects of an active profile in a parent POM will be felt by the child.
Also, since a parent's profile is applied to it before inheritance
calculations take place, inheriting the profile itself (and presumably,
re-applying it at the child level) would lead to double-application of that
profile.
It's a little bit of a confusing topic, so I'm sorry if that explanation is
a bit jumbled. I hope if makes sense now.
-john
On 1/10/07, David Jackman <Da...@fastsearch.com> wrote:
>
> I've searched the mail archives, and this question seems to be asked a
> lot and answered never.
>
> Are profiles inherited from parent poms? The scant (and confusing) docs
> seem to imply that they are, but doing a help:active-profiles command
> does not agree with this.
>
> Please someone explain how this is supposed to work.
>
> ..David..
> FASTforward '07
> The Industry's Largest Business &
> Technology Conference Focused on Search
> February 7th - 9th, San Diego, CA
> www.fastforward07.com
>
>