You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Laird Nelson <lj...@gmail.com> on 2010/12/16 23:18:31 UTC

Profile inheritance in 3.0.1: activates, doesn't

After reading about the pitfalls and spotty implementation of
pseudo-inheritance of profiles, I can report that it appears that for a
profile defined in a parent pom you can activate it from a child as long as
the child doesn't try to activate it using a property value.

So a profile defined in a parent pom that is defined to be active when a
file exists and when a property is true will never be activated by a child,
because the child--or the command line--can never fulfill the property
condition.

I find this to be counterintuitive and weird.

Is this a bug, or by some kind of design that I'm not smart enough to
comprehend?  :-)

Best,
Laird

Re: Profile inheritance in 3.0.1: activates, doesn't

Posted by Anders Hammar <an...@hammar.net>.
I think the best thing is to create a test project that re-produces this.
Then create a jira and attach the test project. Explain the exact command
you execute, the actual outcome and what you expected the outcome to be.
Then it will be easy for someone to spot if it's a Maven issue or incorrect
usage.

/Anders

On Thu, Dec 16, 2010 at 23:18, Laird Nelson <lj...@gmail.com> wrote:

> After reading about the pitfalls and spotty implementation of
> pseudo-inheritance of profiles, I can report that it appears that for a
> profile defined in a parent pom you can activate it from a child as long as
> the child doesn't try to activate it using a property value.
>
> So a profile defined in a parent pom that is defined to be active when a
> file exists and when a property is true will never be activated by a child,
> because the child--or the command line--can never fulfill the property
> condition.
>
> I find this to be counterintuitive and weird.
>
> Is this a bug, or by some kind of design that I'm not smart enough to
> comprehend?  :-)
>
> Best,
> Laird
>