You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Asmann, Roland" <Ro...@adesso.at> on 2011/06/10 15:48:12 UTC

Why is this profile not being activated?

Hi all,

I have this profile defined in a parent-POM:

<profile>
   <id>default-code-coverage</id>
   <activation>
     <file>
       <exists>src/main/java</exists>
     </file>
   </activation>
</profile>

Now, in several child-projects it will not be activated, because there 
are no sources (WAR, EAR or simple resource-projects). However, it is 
also not working on the projects that DO have sources...

Can anybody tell me what I am doing wrong here?

I'm running Maven 2.2.1.

Thanks.

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
You won't see that, because the profiles in a parent are *not* shown in 
this list!

This threw me off on a couple of occasions as well!


On 10-06-11 23:13, David Durham wrote:
> On Fri, Jun 10, 2011 at 3:37 PM, Joakim Olsson<jo...@unbound.se>  wrote:
>> Hmmm...We have a profile for packaging up our SoapUI-tests for
>> regression-testing in the package-phase. The profile contains an
>> execution of the maven-jar-plugin. The profile is specified in the
>> parent of the root-POM of the reactor and it successfully activates
>> only for projects containing a directory called src/sim-test.
>
>
> Have you verified this with the following?
>
>     mvn help:active-profiles
>
>
> -Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by David Durham <da...@gmail.com>.
On Fri, Jun 10, 2011 at 3:37 PM, Joakim Olsson <jo...@unbound.se> wrote:
> Hmmm...We have a profile for packaging up our SoapUI-tests for
> regression-testing in the package-phase. The profile contains an
> execution of the maven-jar-plugin. The profile is specified in the
> parent of the root-POM of the reactor and it successfully activates
> only for projects containing a directory called src/sim-test.


Have you verified this with the following?

   mvn help:active-profiles


-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
Could this be dependent on the version of Maven? Might I ask which 
version you are using?


On 10.06.2011 22:37, Joakim Olsson wrote:
> Hmmm...We have a profile for packaging up our SoapUI-tests for
> regression-testing in the package-phase. The profile contains an
> execution of the maven-jar-plugin. The profile is specified in the
> parent of the root-POM of the reactor and it successfully activates
> only for projects containing a directory called src/sim-test.
>
> Regards
> Joakim
>
>
> On Fri, Jun 10, 2011 at 5:36 PM, Stephen Connolly
> <st...@gmail.com> wrote:
>  > This is the nasty side of inheritance...
>  >
>  > so if you have a reactor with the parent in it, then the profile will
>  > be activated/no activated for the parent in the context of the parent
>  > pom within the reactor.
>  >
>  > if you don't have a reactor with the parent in it, then the pom file
>  > is actually hiding in your local repository, and oh look there will be
>  > no file in the sub-directory of your local repository where the pom is
>  > hiding (and it would be a bug if we activated based on the presence of
>  > the file in your local repo, so don't go thinking you can just cheat
>  > there) [i.e. the previous is just to try and get you to understand]
>  >
>  > when you use manual profile activation with -P then in evaluating the
>  > parent pom to build the reactor, we enable the profile within the
>  > parent pom, and anything that profile defines which is inheritable
>  > will be inherited... which is why you might think that profiles are
>  > inherited, when it is actually the effects of the profile that are
>  > inherited.
>  >
>  > I hope that makes sense for you
>  >
>  > -Stephen
>  >
>  > On 10 June 2011 15:58, Asmann, Roland <Ro...@adesso.at> wrote:
>  >> I am indeed using option 2, and I understand that the profile itself is
>  >> not inherited. What I do not understand is how and where it validates
>  >> the existence of the file... The way I see it, it should validate this
>  >> on the project being build.
>  >>
>  >> Clearly I am missing something here which is obvious to all of you, so
>  >> please try to explain this to me.
>  >>
>  >>
>  >> On 10.06.2011 16:51, Rafael Vanderlei wrote:
>  >>> Roland are you (1) defining the profile with the cobertura
> configuration in
>  >>> a pom of a project where "src/main/java" DOES exist or (2) are you
> defining
>  >>> it in a parent pom of a project where "src/main/java" does NOT
> exist and you
>  >>> are expecting it to work in child projects where "src/main/java"
> DOES exist
>  >>> ?
>  >>>
>  >>> If option 2, it will not work this way because the profile with
> cobertura
>  >>> configuration will not be inherited in the children
>  >>>
>  >>> On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland
>  >>> <Ro...@adesso.at>wrote:
>  >>>
>  >>> > It is not being activated, because the plugin I have defined
> (cobertura)
>  >>> > doesn't run. I think it is quite obviously that this means that the
>  >>> > profile isn't activated...
>  >>> >
>  >>> >
>  >>> > On 10.06.2011 16:40, Rafael Vanderlei wrote:
>  >>> > > David, when we say "profiles are not inherited" it´s because it is
>  >>> really
>  >>> > > not inherited.. I mean.. if you define a profile in a parent with
>  >>> lots of
>  >>> > > configurations and then you define a profile with the same name
> in a
>  >>> > child
>  >>> > > the configuration defined in the parent is not applyied to the
>  >>> child. The
>  >>> > > child has a new brand profile that happens to have the same
> name of the
>  >>> > > profile defined in the parent.
>  >>> > >
>  >>> > > And because they have the same name, they both get activated by
> -P, but
>  >>> > they
>  >>> > > are two different profiles, each one with its own configuration.
>  >>> > >
>  >>> > > @Roland what makes you say profile is not being activated? For the
>  >>> > > configuration you showed before, you did not define any special
>  >>> behaviour
>  >>> > to
>  >>> > > happen when the profile "default-code-coverage" is active.
>  >>> > >
>  >>> > > On Fri, Jun 10, 2011 at 11:29 AM, David Durham
>  >>> > > <da...@gmail.com>wrote:
>  >>> > >
>  >>> > > > I think the statement "profiles are not inherited" is not
> strictly
>  >>> > > > true. Activation with <file> does not work on an inherited basis.
>  >>> > > > But direct activation at the command line with -P does work,
> even if
>  >>> > > > the profile is defined in a parent pom.
>  >>> > > >
>  >>> > > > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <
>  >>> > Roland.Asmann@adesso.at>
>  >>> > > > wrote:
>  >>> > > > > OK, so why isn't this one activated? It should be imho...
>  >>> > > > >
>  >>> > > > >
>  >>> > > > > On 10.06.2011 15:53, Stephen Connolly wrote:
>  >>> > > > >> profiles are not inherited... the results of activating them
>  >>> in the
>  >>> > > > >> reactor are inherited
>  >>> > > > >>
>  >>> > > > >> On 10 June 2011 14:48, Asmann, Roland
> <Ro...@adesso.at>
>  >>> > wrote:
>  >>> > > > >> > Hi all,
>  >>> > > > >> >
>  >>> > > > >> > I have this profile defined in a parent-POM:
>  >>> > > > >> >
>  >>> > > > >> > <profile>
>  >>> > > > >> > <id>default-code-coverage</id>
>  >>> > > > >> > <activation>
>  >>> > > > >> > <file>
>  >>> > > > >> > <exists>src/main/java</exists>
>  >>> > > > >> > </file>
>  >>> > > > >> > </activation>
>  >>> > > > >> > </profile>
>  >>> > > > >> >
>  >>> > > > >> > Now, in several child-projects it will not be activated,
> because
>  >>> > > > there
>  >>> > > > >> > are no sources (WAR, EAR or simple resource-projects).
> However,
>  >>> > > it is
>  >>> > > > >> > also not working on the projects that DO have sources...
>  >>> > > > >> >
>  >>> > > > >> > Can anybody tell me what I am doing wrong here?
>  >>> > > > >> >
>  >>> > > > >> > I'm running Maven 2.2.1.
>  >>> > > > >> >
>  >>> > > > >> > Thanks.
>  >>> > > > >> >
>  >>> > > > >> > --
>  >>> > > > >> > Roland Asmann
>  >>> > > > >> > Senior Software Engineer
>  >>> > > > >> >
>  >>> > > > >> > adesso Austria GmbH
>  >>> > > > >> > Floridotower 26. Stock T +43 1 2198790-27
>  >>> > > > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  >>> > > > >> > A-1210 Wien M +43 664 88657566
>  >>> > > > >> > E roland.asmann@adesso.at
>  >>> > > > >> > W www.adesso.at
>  >>> > > > >> >
>  >>> > > > >> >
> -------------------------------------------------------------
>  >>> > > > >> > >>> business. people. technology. <<<
>  >>> > > > >> >
> -------------------------------------------------------------
>  >>> > > > >> >
>  >>> > > > >> >
>  >>> > >
> ---------------------------------------------------------------------
>  >>> > > > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >>> > > > >> > For additional commands, e-mail: users-help@maven.apache.org
>  >>> > > > >> >
>  >>> > > > >> >
>  >>> > > > >>
>  >>> > > > >>
>  >>> > ---------------------------------------------------------------------
>  >>> > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >>> > > > >> For additional commands, e-mail: users-help@maven.apache.org
>  >>> > > > >>
>  >>> > > > >
>  >>> > > > > --
>  >>> > > > > Roland Asmann
>  >>> > > > > Senior Software Engineer
>  >>> > > > >
>  >>> > > > > adesso Austria GmbH
>  >>> > > > > Floridotower 26. Stock T +43 1 2198790-27
>  >>> > > > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  >>> > > > > A-1210 Wien M +43 664 88657566
>  >>> > > > > E roland.asmann@adesso.at
>  >>> > > > > W www.adesso.at
>  >>> > > > >
>  >>> > > > > -------------------------------------------------------------
>  >>> > > > > >>> business. people. technology. <<<
>  >>> > > > > -------------------------------------------------------------
>  >>> > > > >
>  >>> > > > >
>  >>> > ---------------------------------------------------------------------
>  >>> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >>> > > > > For additional commands, e-mail: users-help@maven.apache.org
>  >>> > > > >
>  >>> > > > >
>  >>> > > >
>  >>> > > >
> ---------------------------------------------------------------------
>  >>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >>> > > > For additional commands, e-mail: users-help@maven.apache.org
>  >>> > > >
>  >>> > > >
>  >>> > >
>  >>> >
>  >>> > --
>  >>> > Roland Asmann
>  >>> > Senior Software Engineer
>  >>> >
>  >>> > adesso Austria GmbH
>  >>> > Floridotower 26. Stock T +43 1 2198790-27
>  >>> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  >>> > A-1210 Wien M +43 664 88657566
>  >>> > E roland.asmann@adesso.at
>  >>> > W www.adesso.at
>  >>> >
>  >>> > -------------------------------------------------------------
>  >>> > >>> business. people. technology. <<<
>  >>> > -------------------------------------------------------------
>  >>> >
>  >>> > ---------------------------------------------------------------------
>  >>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >>> > For additional commands, e-mail: users-help@maven.apache.org
>  >>> >
>  >>> >
>  >>>
>  >>
>  >> --
>  >> Roland Asmann
>  >> Senior Software Engineer
>  >>
>  >> adesso Austria GmbH
>  >> Floridotower 26. Stock              T +43 1 2198790-27
>  >> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
>  >> A-1210 Wien                         M +43 664 88657566
>  >>                                    E roland.asmann@adesso.at
>  >>                                    W www.adesso.at
>  >>
>  >> -------------------------------------------------------------
>  >> >>> business. people. technology. <<<
>  >> -------------------------------------------------------------
>  >>
>  >> ---------------------------------------------------------------------
>  >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >> For additional commands, e-mail: users-help@maven.apache.org
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > For additional commands, e-mail: users-help@maven.apache.org
>  >
>  >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Joakim Olsson <jo...@unbound.se>.
Hmmm...We have a profile for packaging up our SoapUI-tests for
regression-testing in the package-phase. The profile contains an
execution of the maven-jar-plugin. The profile is specified in the
parent of the root-POM of the reactor and it successfully activates
only for projects containing a directory called src/sim-test.

Regards
Joakim


On Fri, Jun 10, 2011 at 5:36 PM, Stephen Connolly
<st...@gmail.com> wrote:
> This is the nasty side of inheritance...
>
> so if you have a reactor with the parent in it, then the profile will
> be activated/no activated for the parent in the context of the parent
> pom within the reactor.
>
> if you don't have a reactor with the parent in it, then the pom file
> is actually hiding in your local repository, and oh look there will be
> no file in the sub-directory of your local repository where the pom is
> hiding (and it would be a bug if we activated based on the presence of
> the file in your local repo, so don't go thinking you can just cheat
> there) [i.e. the previous is just to try and get you to understand]
>
> when you use manual profile activation with -P then in evaluating the
> parent pom to build the reactor, we enable the profile within the
> parent pom, and anything that profile defines which is inheritable
> will be inherited... which is why you might think that profiles are
> inherited, when it is actually the effects of the profile that are
> inherited.
>
> I hope that makes sense for you
>
> -Stephen
>
> On 10 June 2011 15:58, Asmann, Roland <Ro...@adesso.at> wrote:
>> I am indeed using option 2, and I understand that the profile itself is
>> not inherited. What I do not understand is how and where it validates
>> the existence of the file... The way I see it, it should validate this
>> on the project being build.
>>
>> Clearly I am missing something here which is obvious to all of you, so
>> please try to explain this to me.
>>
>>
>> On 10.06.2011 16:51, Rafael Vanderlei wrote:
>>> Roland are you (1) defining the profile with the cobertura configuration in
>>> a pom of a project where "src/main/java" DOES exist or (2) are you defining
>>> it in a parent pom of a project where "src/main/java" does NOT exist and you
>>> are expecting it to work in child projects where "src/main/java" DOES exist
>>> ?
>>>
>>> If option 2, it will not work this way because the profile with cobertura
>>> configuration will not be inherited in the children
>>>
>>> On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland
>>> <Ro...@adesso.at>wrote:
>>>
>>>  > It is not being activated, because the plugin I have defined (cobertura)
>>>  > doesn't run. I think it is quite obviously that this means that the
>>>  > profile isn't activated...
>>>  >
>>>  >
>>>  > On 10.06.2011 16:40, Rafael Vanderlei wrote:
>>>  > > David, when we say "profiles are not inherited" it´s because it is
>>> really
>>>  > > not inherited.. I mean.. if you define a profile in a parent with
>>> lots of
>>>  > > configurations and then you define a profile with the same name in a
>>>  > child
>>>  > > the configuration defined in the parent is not applyied to the
>>> child. The
>>>  > > child has a new brand profile that happens to have the same name of the
>>>  > > profile defined in the parent.
>>>  > >
>>>  > > And because they have the same name, they both get activated by -P, but
>>>  > they
>>>  > > are two different profiles, each one with its own configuration.
>>>  > >
>>>  > > @Roland what makes you say profile is not being activated? For the
>>>  > > configuration you showed before, you did not define any special
>>> behaviour
>>>  > to
>>>  > > happen when the profile "default-code-coverage" is active.
>>>  > >
>>>  > > On Fri, Jun 10, 2011 at 11:29 AM, David Durham
>>>  > > <da...@gmail.com>wrote:
>>>  > >
>>>  > > > I think the statement "profiles are not inherited" is not strictly
>>>  > > > true. Activation with <file> does not work on an inherited basis.
>>>  > > > But direct activation at the command line with -P does work, even if
>>>  > > > the profile is defined in a parent pom.
>>>  > > >
>>>  > > > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <
>>>  > Roland.Asmann@adesso.at>
>>>  > > > wrote:
>>>  > > > > OK, so why isn't this one activated? It should be imho...
>>>  > > > >
>>>  > > > >
>>>  > > > > On 10.06.2011 15:53, Stephen Connolly wrote:
>>>  > > > >> profiles are not inherited... the results of activating them
>>> in the
>>>  > > > >> reactor are inherited
>>>  > > > >>
>>>  > > > >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at>
>>>  > wrote:
>>>  > > > >> > Hi all,
>>>  > > > >> >
>>>  > > > >> > I have this profile defined in a parent-POM:
>>>  > > > >> >
>>>  > > > >> > <profile>
>>>  > > > >> > <id>default-code-coverage</id>
>>>  > > > >> > <activation>
>>>  > > > >> > <file>
>>>  > > > >> > <exists>src/main/java</exists>
>>>  > > > >> > </file>
>>>  > > > >> > </activation>
>>>  > > > >> > </profile>
>>>  > > > >> >
>>>  > > > >> > Now, in several child-projects it will not be activated, because
>>>  > > > there
>>>  > > > >> > are no sources (WAR, EAR or simple resource-projects). However,
>>>  > > it is
>>>  > > > >> > also not working on the projects that DO have sources...
>>>  > > > >> >
>>>  > > > >> > Can anybody tell me what I am doing wrong here?
>>>  > > > >> >
>>>  > > > >> > I'm running Maven 2.2.1.
>>>  > > > >> >
>>>  > > > >> > Thanks.
>>>  > > > >> >
>>>  > > > >> > --
>>>  > > > >> > Roland Asmann
>>>  > > > >> > Senior Software Engineer
>>>  > > > >> >
>>>  > > > >> > adesso Austria GmbH
>>>  > > > >> > Floridotower 26. Stock T +43 1 2198790-27
>>>  > > > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>>  > > > >> > A-1210 Wien M +43 664 88657566
>>>  > > > >> > E roland.asmann@adesso.at
>>>  > > > >> > W www.adesso.at
>>>  > > > >> >
>>>  > > > >> > -------------------------------------------------------------
>>>  > > > >> > >>> business. people. technology. <<<
>>>  > > > >> > -------------------------------------------------------------
>>>  > > > >> >
>>>  > > > >> >
>>>  > > ---------------------------------------------------------------------
>>>  > > > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>  > > > >> > For additional commands, e-mail: users-help@maven.apache.org
>>>  > > > >> >
>>>  > > > >> >
>>>  > > > >>
>>>  > > > >>
>>>  > ---------------------------------------------------------------------
>>>  > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>  > > > >> For additional commands, e-mail: users-help@maven.apache.org
>>>  > > > >>
>>>  > > > >
>>>  > > > > --
>>>  > > > > Roland Asmann
>>>  > > > > Senior Software Engineer
>>>  > > > >
>>>  > > > > adesso Austria GmbH
>>>  > > > > Floridotower 26. Stock T +43 1 2198790-27
>>>  > > > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>>  > > > > A-1210 Wien M +43 664 88657566
>>>  > > > > E roland.asmann@adesso.at
>>>  > > > > W www.adesso.at
>>>  > > > >
>>>  > > > > -------------------------------------------------------------
>>>  > > > > >>> business. people. technology. <<<
>>>  > > > > -------------------------------------------------------------
>>>  > > > >
>>>  > > > >
>>>  > ---------------------------------------------------------------------
>>>  > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>  > > > > For additional commands, e-mail: users-help@maven.apache.org
>>>  > > > >
>>>  > > > >
>>>  > > >
>>>  > > > ---------------------------------------------------------------------
>>>  > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>  > > > For additional commands, e-mail: users-help@maven.apache.org
>>>  > > >
>>>  > > >
>>>  > >
>>>  >
>>>  > --
>>>  > Roland Asmann
>>>  > Senior Software Engineer
>>>  >
>>>  > adesso Austria GmbH
>>>  > Floridotower 26. Stock T +43 1 2198790-27
>>>  > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>>  > A-1210 Wien M +43 664 88657566
>>>  > E roland.asmann@adesso.at
>>>  > W www.adesso.at
>>>  >
>>>  > -------------------------------------------------------------
>>>  > >>> business. people. technology. <<<
>>>  > -------------------------------------------------------------
>>>  >
>>>  > ---------------------------------------------------------------------
>>>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>  > For additional commands, e-mail: users-help@maven.apache.org
>>>  >
>>>  >
>>>
>>
>> --
>> Roland Asmann
>> Senior Software Engineer
>>
>> adesso Austria GmbH
>> Floridotower 26. Stock              T +43 1 2198790-27
>> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
>> A-1210 Wien                         M +43 664 88657566
>>                                    E roland.asmann@adesso.at
>>                                    W www.adesso.at
>>
>> -------------------------------------------------------------
>>             >>> business. people. technology. <<<
>> -------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Stephen Connolly <st...@gmail.com>.
This is the nasty side of inheritance...

so if you have a reactor with the parent in it, then the profile will
be activated/no activated for the parent in the context of the parent
pom within the reactor.

if you don't have a reactor with the parent in it, then the pom file
is actually hiding in your local repository, and oh look there will be
no file in the sub-directory of your local repository where the pom is
hiding (and it would be a bug if we activated based on the presence of
the file in your local repo, so don't go thinking you can just cheat
there) [i.e. the previous is just to try and get you to understand]

when you use manual profile activation with -P then in evaluating the
parent pom to build the reactor, we enable the profile within the
parent pom, and anything that profile defines which is inheritable
will be inherited... which is why you might think that profiles are
inherited, when it is actually the effects of the profile that are
inherited.

I hope that makes sense for you

-Stephen

On 10 June 2011 15:58, Asmann, Roland <Ro...@adesso.at> wrote:
> I am indeed using option 2, and I understand that the profile itself is
> not inherited. What I do not understand is how and where it validates
> the existence of the file... The way I see it, it should validate this
> on the project being build.
>
> Clearly I am missing something here which is obvious to all of you, so
> please try to explain this to me.
>
>
> On 10.06.2011 16:51, Rafael Vanderlei wrote:
>> Roland are you (1) defining the profile with the cobertura configuration in
>> a pom of a project where "src/main/java" DOES exist or (2) are you defining
>> it in a parent pom of a project where "src/main/java" does NOT exist and you
>> are expecting it to work in child projects where "src/main/java" DOES exist
>> ?
>>
>> If option 2, it will not work this way because the profile with cobertura
>> configuration will not be inherited in the children
>>
>> On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland
>> <Ro...@adesso.at>wrote:
>>
>>  > It is not being activated, because the plugin I have defined (cobertura)
>>  > doesn't run. I think it is quite obviously that this means that the
>>  > profile isn't activated...
>>  >
>>  >
>>  > On 10.06.2011 16:40, Rafael Vanderlei wrote:
>>  > > David, when we say "profiles are not inherited" it´s because it is
>> really
>>  > > not inherited.. I mean.. if you define a profile in a parent with
>> lots of
>>  > > configurations and then you define a profile with the same name in a
>>  > child
>>  > > the configuration defined in the parent is not applyied to the
>> child. The
>>  > > child has a new brand profile that happens to have the same name of the
>>  > > profile defined in the parent.
>>  > >
>>  > > And because they have the same name, they both get activated by -P, but
>>  > they
>>  > > are two different profiles, each one with its own configuration.
>>  > >
>>  > > @Roland what makes you say profile is not being activated? For the
>>  > > configuration you showed before, you did not define any special
>> behaviour
>>  > to
>>  > > happen when the profile "default-code-coverage" is active.
>>  > >
>>  > > On Fri, Jun 10, 2011 at 11:29 AM, David Durham
>>  > > <da...@gmail.com>wrote:
>>  > >
>>  > > > I think the statement "profiles are not inherited" is not strictly
>>  > > > true. Activation with <file> does not work on an inherited basis.
>>  > > > But direct activation at the command line with -P does work, even if
>>  > > > the profile is defined in a parent pom.
>>  > > >
>>  > > > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <
>>  > Roland.Asmann@adesso.at>
>>  > > > wrote:
>>  > > > > OK, so why isn't this one activated? It should be imho...
>>  > > > >
>>  > > > >
>>  > > > > On 10.06.2011 15:53, Stephen Connolly wrote:
>>  > > > >> profiles are not inherited... the results of activating them
>> in the
>>  > > > >> reactor are inherited
>>  > > > >>
>>  > > > >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at>
>>  > wrote:
>>  > > > >> > Hi all,
>>  > > > >> >
>>  > > > >> > I have this profile defined in a parent-POM:
>>  > > > >> >
>>  > > > >> > <profile>
>>  > > > >> > <id>default-code-coverage</id>
>>  > > > >> > <activation>
>>  > > > >> > <file>
>>  > > > >> > <exists>src/main/java</exists>
>>  > > > >> > </file>
>>  > > > >> > </activation>
>>  > > > >> > </profile>
>>  > > > >> >
>>  > > > >> > Now, in several child-projects it will not be activated, because
>>  > > > there
>>  > > > >> > are no sources (WAR, EAR or simple resource-projects). However,
>>  > > it is
>>  > > > >> > also not working on the projects that DO have sources...
>>  > > > >> >
>>  > > > >> > Can anybody tell me what I am doing wrong here?
>>  > > > >> >
>>  > > > >> > I'm running Maven 2.2.1.
>>  > > > >> >
>>  > > > >> > Thanks.
>>  > > > >> >
>>  > > > >> > --
>>  > > > >> > Roland Asmann
>>  > > > >> > Senior Software Engineer
>>  > > > >> >
>>  > > > >> > adesso Austria GmbH
>>  > > > >> > Floridotower 26. Stock T +43 1 2198790-27
>>  > > > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>  > > > >> > A-1210 Wien M +43 664 88657566
>>  > > > >> > E roland.asmann@adesso.at
>>  > > > >> > W www.adesso.at
>>  > > > >> >
>>  > > > >> > -------------------------------------------------------------
>>  > > > >> > >>> business. people. technology. <<<
>>  > > > >> > -------------------------------------------------------------
>>  > > > >> >
>>  > > > >> >
>>  > > ---------------------------------------------------------------------
>>  > > > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > >> > For additional commands, e-mail: users-help@maven.apache.org
>>  > > > >> >
>>  > > > >> >
>>  > > > >>
>>  > > > >>
>>  > ---------------------------------------------------------------------
>>  > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > >> For additional commands, e-mail: users-help@maven.apache.org
>>  > > > >>
>>  > > > >
>>  > > > > --
>>  > > > > Roland Asmann
>>  > > > > Senior Software Engineer
>>  > > > >
>>  > > > > adesso Austria GmbH
>>  > > > > Floridotower 26. Stock T +43 1 2198790-27
>>  > > > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>  > > > > A-1210 Wien M +43 664 88657566
>>  > > > > E roland.asmann@adesso.at
>>  > > > > W www.adesso.at
>>  > > > >
>>  > > > > -------------------------------------------------------------
>>  > > > > >>> business. people. technology. <<<
>>  > > > > -------------------------------------------------------------
>>  > > > >
>>  > > > >
>>  > ---------------------------------------------------------------------
>>  > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > > For additional commands, e-mail: users-help@maven.apache.org
>>  > > > >
>>  > > > >
>>  > > >
>>  > > > ---------------------------------------------------------------------
>>  > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > For additional commands, e-mail: users-help@maven.apache.org
>>  > > >
>>  > > >
>>  > >
>>  >
>>  > --
>>  > Roland Asmann
>>  > Senior Software Engineer
>>  >
>>  > adesso Austria GmbH
>>  > Floridotower 26. Stock T +43 1 2198790-27
>>  > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>  > A-1210 Wien M +43 664 88657566
>>  > E roland.asmann@adesso.at
>>  > W www.adesso.at
>>  >
>>  > -------------------------------------------------------------
>>  > >>> business. people. technology. <<<
>>  > -------------------------------------------------------------
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > For additional commands, e-mail: users-help@maven.apache.org
>>  >
>>  >
>>
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock              T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> A-1210 Wien                         M +43 664 88657566
>                                    E roland.asmann@adesso.at
>                                    W www.adesso.at
>
> -------------------------------------------------------------
>             >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by David Durham <da...@gmail.com>.
Well, probably neither of us is going to submit a patch to make
profiles work the way we want.  I myself would like to do the thing
you're describing.

You can control plugin merging:

http://www.sonatype.com/people/2011/01/maven-how-to-merging-plugin-configuration-in-complex-projects/

So if you define the cobertura plugin in the parent pom's
pluginManagement section, only projects that declare the plugin will
pull in the plugin along with the configuration from the parent.


On Fri, Jun 10, 2011 at 9:58 AM, Asmann, Roland <Ro...@adesso.at> wrote:
> I am indeed using option 2, and I understand that the profile itself is
> not inherited. What I do not understand is how and where it validates
> the existence of the file... The way I see it, it should validate this
> on the project being build.
>
> Clearly I am missing something here which is obvious to all of you, so
> please try to explain this to me.
>
>
> On 10.06.2011 16:51, Rafael Vanderlei wrote:
>> Roland are you (1) defining the profile with the cobertura configuration in
>> a pom of a project where "src/main/java" DOES exist or (2) are you defining
>> it in a parent pom of a project where "src/main/java" does NOT exist and you
>> are expecting it to work in child projects where "src/main/java" DOES exist
>> ?
>>
>> If option 2, it will not work this way because the profile with cobertura
>> configuration will not be inherited in the children
>>
>> On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland
>> <Ro...@adesso.at>wrote:
>>
>>  > It is not being activated, because the plugin I have defined (cobertura)
>>  > doesn't run. I think it is quite obviously that this means that the
>>  > profile isn't activated...
>>  >
>>  >
>>  > On 10.06.2011 16:40, Rafael Vanderlei wrote:
>>  > > David, when we say "profiles are not inherited" it´s because it is
>> really
>>  > > not inherited.. I mean.. if you define a profile in a parent with
>> lots of
>>  > > configurations and then you define a profile with the same name in a
>>  > child
>>  > > the configuration defined in the parent is not applyied to the
>> child. The
>>  > > child has a new brand profile that happens to have the same name of the
>>  > > profile defined in the parent.
>>  > >
>>  > > And because they have the same name, they both get activated by -P, but
>>  > they
>>  > > are two different profiles, each one with its own configuration.
>>  > >
>>  > > @Roland what makes you say profile is not being activated? For the
>>  > > configuration you showed before, you did not define any special
>> behaviour
>>  > to
>>  > > happen when the profile "default-code-coverage" is active.
>>  > >
>>  > > On Fri, Jun 10, 2011 at 11:29 AM, David Durham
>>  > > <da...@gmail.com>wrote:
>>  > >
>>  > > > I think the statement "profiles are not inherited" is not strictly
>>  > > > true. Activation with <file> does not work on an inherited basis.
>>  > > > But direct activation at the command line with -P does work, even if
>>  > > > the profile is defined in a parent pom.
>>  > > >
>>  > > > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <
>>  > Roland.Asmann@adesso.at>
>>  > > > wrote:
>>  > > > > OK, so why isn't this one activated? It should be imho...
>>  > > > >
>>  > > > >
>>  > > > > On 10.06.2011 15:53, Stephen Connolly wrote:
>>  > > > >> profiles are not inherited... the results of activating them
>> in the
>>  > > > >> reactor are inherited
>>  > > > >>
>>  > > > >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at>
>>  > wrote:
>>  > > > >> > Hi all,
>>  > > > >> >
>>  > > > >> > I have this profile defined in a parent-POM:
>>  > > > >> >
>>  > > > >> > <profile>
>>  > > > >> > <id>default-code-coverage</id>
>>  > > > >> > <activation>
>>  > > > >> > <file>
>>  > > > >> > <exists>src/main/java</exists>
>>  > > > >> > </file>
>>  > > > >> > </activation>
>>  > > > >> > </profile>
>>  > > > >> >
>>  > > > >> > Now, in several child-projects it will not be activated, because
>>  > > > there
>>  > > > >> > are no sources (WAR, EAR or simple resource-projects). However,
>>  > > it is
>>  > > > >> > also not working on the projects that DO have sources...
>>  > > > >> >
>>  > > > >> > Can anybody tell me what I am doing wrong here?
>>  > > > >> >
>>  > > > >> > I'm running Maven 2.2.1.
>>  > > > >> >
>>  > > > >> > Thanks.
>>  > > > >> >
>>  > > > >> > --
>>  > > > >> > Roland Asmann
>>  > > > >> > Senior Software Engineer
>>  > > > >> >
>>  > > > >> > adesso Austria GmbH
>>  > > > >> > Floridotower 26. Stock T +43 1 2198790-27
>>  > > > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>  > > > >> > A-1210 Wien M +43 664 88657566
>>  > > > >> > E roland.asmann@adesso.at
>>  > > > >> > W www.adesso.at
>>  > > > >> >
>>  > > > >> > -------------------------------------------------------------
>>  > > > >> > >>> business. people. technology. <<<
>>  > > > >> > -------------------------------------------------------------
>>  > > > >> >
>>  > > > >> >
>>  > > ---------------------------------------------------------------------
>>  > > > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > >> > For additional commands, e-mail: users-help@maven.apache.org
>>  > > > >> >
>>  > > > >> >
>>  > > > >>
>>  > > > >>
>>  > ---------------------------------------------------------------------
>>  > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > >> For additional commands, e-mail: users-help@maven.apache.org
>>  > > > >>
>>  > > > >
>>  > > > > --
>>  > > > > Roland Asmann
>>  > > > > Senior Software Engineer
>>  > > > >
>>  > > > > adesso Austria GmbH
>>  > > > > Floridotower 26. Stock T +43 1 2198790-27
>>  > > > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>  > > > > A-1210 Wien M +43 664 88657566
>>  > > > > E roland.asmann@adesso.at
>>  > > > > W www.adesso.at
>>  > > > >
>>  > > > > -------------------------------------------------------------
>>  > > > > >>> business. people. technology. <<<
>>  > > > > -------------------------------------------------------------
>>  > > > >
>>  > > > >
>>  > ---------------------------------------------------------------------
>>  > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > > For additional commands, e-mail: users-help@maven.apache.org
>>  > > > >
>>  > > > >
>>  > > >
>>  > > > ---------------------------------------------------------------------
>>  > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > > > For additional commands, e-mail: users-help@maven.apache.org
>>  > > >
>>  > > >
>>  > >
>>  >
>>  > --
>>  > Roland Asmann
>>  > Senior Software Engineer
>>  >
>>  > adesso Austria GmbH
>>  > Floridotower 26. Stock T +43 1 2198790-27
>>  > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>>  > A-1210 Wien M +43 664 88657566
>>  > E roland.asmann@adesso.at
>>  > W www.adesso.at
>>  >
>>  > -------------------------------------------------------------
>>  > >>> business. people. technology. <<<
>>  > -------------------------------------------------------------
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > For additional commands, e-mail: users-help@maven.apache.org
>>  >
>>  >
>>
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock              T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> A-1210 Wien                         M +43 664 88657566
>                                    E roland.asmann@adesso.at
>                                    W www.adesso.at
>
> -------------------------------------------------------------
>             >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
I am indeed using option 2, and I understand that the profile itself is 
not inherited. What I do not understand is how and where it validates 
the existence of the file... The way I see it, it should validate this 
on the project being build.

Clearly I am missing something here which is obvious to all of you, so 
please try to explain this to me.


On 10.06.2011 16:51, Rafael Vanderlei wrote:
> Roland are you (1) defining the profile with the cobertura configuration in
> a pom of a project where "src/main/java" DOES exist or (2) are you defining
> it in a parent pom of a project where "src/main/java" does NOT exist and you
> are expecting it to work in child projects where "src/main/java" DOES exist
> ?
>
> If option 2, it will not work this way because the profile with cobertura
> configuration will not be inherited in the children
>
> On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland
> <Ro...@adesso.at>wrote:
>
>  > It is not being activated, because the plugin I have defined (cobertura)
>  > doesn't run. I think it is quite obviously that this means that the
>  > profile isn't activated...
>  >
>  >
>  > On 10.06.2011 16:40, Rafael Vanderlei wrote:
>  > > David, when we say "profiles are not inherited" it´s because it is
> really
>  > > not inherited.. I mean.. if you define a profile in a parent with
> lots of
>  > > configurations and then you define a profile with the same name in a
>  > child
>  > > the configuration defined in the parent is not applyied to the
> child. The
>  > > child has a new brand profile that happens to have the same name of the
>  > > profile defined in the parent.
>  > >
>  > > And because they have the same name, they both get activated by -P, but
>  > they
>  > > are two different profiles, each one with its own configuration.
>  > >
>  > > @Roland what makes you say profile is not being activated? For the
>  > > configuration you showed before, you did not define any special
> behaviour
>  > to
>  > > happen when the profile "default-code-coverage" is active.
>  > >
>  > > On Fri, Jun 10, 2011 at 11:29 AM, David Durham
>  > > <da...@gmail.com>wrote:
>  > >
>  > > > I think the statement "profiles are not inherited" is not strictly
>  > > > true. Activation with <file> does not work on an inherited basis.
>  > > > But direct activation at the command line with -P does work, even if
>  > > > the profile is defined in a parent pom.
>  > > >
>  > > > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <
>  > Roland.Asmann@adesso.at>
>  > > > wrote:
>  > > > > OK, so why isn't this one activated? It should be imho...
>  > > > >
>  > > > >
>  > > > > On 10.06.2011 15:53, Stephen Connolly wrote:
>  > > > >> profiles are not inherited... the results of activating them
> in the
>  > > > >> reactor are inherited
>  > > > >>
>  > > > >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at>
>  > wrote:
>  > > > >> > Hi all,
>  > > > >> >
>  > > > >> > I have this profile defined in a parent-POM:
>  > > > >> >
>  > > > >> > <profile>
>  > > > >> > <id>default-code-coverage</id>
>  > > > >> > <activation>
>  > > > >> > <file>
>  > > > >> > <exists>src/main/java</exists>
>  > > > >> > </file>
>  > > > >> > </activation>
>  > > > >> > </profile>
>  > > > >> >
>  > > > >> > Now, in several child-projects it will not be activated, because
>  > > > there
>  > > > >> > are no sources (WAR, EAR or simple resource-projects). However,
>  > > it is
>  > > > >> > also not working on the projects that DO have sources...
>  > > > >> >
>  > > > >> > Can anybody tell me what I am doing wrong here?
>  > > > >> >
>  > > > >> > I'm running Maven 2.2.1.
>  > > > >> >
>  > > > >> > Thanks.
>  > > > >> >
>  > > > >> > --
>  > > > >> > Roland Asmann
>  > > > >> > Senior Software Engineer
>  > > > >> >
>  > > > >> > adesso Austria GmbH
>  > > > >> > Floridotower 26. Stock T +43 1 2198790-27
>  > > > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  > > > >> > A-1210 Wien M +43 664 88657566
>  > > > >> > E roland.asmann@adesso.at
>  > > > >> > W www.adesso.at
>  > > > >> >
>  > > > >> > -------------------------------------------------------------
>  > > > >> > >>> business. people. technology. <<<
>  > > > >> > -------------------------------------------------------------
>  > > > >> >
>  > > > >> >
>  > > ---------------------------------------------------------------------
>  > > > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > > > >> > For additional commands, e-mail: users-help@maven.apache.org
>  > > > >> >
>  > > > >> >
>  > > > >>
>  > > > >>
>  > ---------------------------------------------------------------------
>  > > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > > > >> For additional commands, e-mail: users-help@maven.apache.org
>  > > > >>
>  > > > >
>  > > > > --
>  > > > > Roland Asmann
>  > > > > Senior Software Engineer
>  > > > >
>  > > > > adesso Austria GmbH
>  > > > > Floridotower 26. Stock T +43 1 2198790-27
>  > > > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  > > > > A-1210 Wien M +43 664 88657566
>  > > > > E roland.asmann@adesso.at
>  > > > > W www.adesso.at
>  > > > >
>  > > > > -------------------------------------------------------------
>  > > > > >>> business. people. technology. <<<
>  > > > > -------------------------------------------------------------
>  > > > >
>  > > > >
>  > ---------------------------------------------------------------------
>  > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > > > > For additional commands, e-mail: users-help@maven.apache.org
>  > > > >
>  > > > >
>  > > >
>  > > > ---------------------------------------------------------------------
>  > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > > > For additional commands, e-mail: users-help@maven.apache.org
>  > > >
>  > > >
>  > >
>  >
>  > --
>  > Roland Asmann
>  > Senior Software Engineer
>  >
>  > adesso Austria GmbH
>  > Floridotower 26. Stock T +43 1 2198790-27
>  > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  > A-1210 Wien M +43 664 88657566
>  > E roland.asmann@adesso.at
>  > W www.adesso.at
>  >
>  > -------------------------------------------------------------
>  > >>> business. people. technology. <<<
>  > -------------------------------------------------------------
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > For additional commands, e-mail: users-help@maven.apache.org
>  >
>  >
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Rafael Vanderlei <ra...@gmail.com>.
Roland are you (1) defining the profile with the cobertura configuration in
a pom of a project where "src/main/java" DOES exist or (2) are you defining
it in a parent pom of a project where "src/main/java" does NOT exist and you
are expecting it to work in child projects where "src/main/java" DOES exist
?

If option 2, it will not work this way because the profile with cobertura
configuration will not be inherited in the children

On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland <Ro...@adesso.at>wrote:

> It is not being activated, because the plugin I have defined (cobertura)
> doesn't run. I think it is quite obviously that this means that the
> profile isn't activated...
>
>
> On 10.06.2011 16:40, Rafael Vanderlei wrote:
> > David, when we say "profiles are not inherited" it´s because it is really
> > not inherited.. I mean.. if you define a profile in a parent with lots of
> > configurations and then you define a profile with the same name in a
> child
> > the configuration defined in the parent is not applyied to the child. The
> > child has a new brand profile that happens to have the same name of the
> > profile defined in the parent.
> >
> > And because they have the same name, they both get activated by -P, but
> they
> > are two different profiles, each one with its own configuration.
> >
> > @Roland what makes you say profile is not being activated? For the
> > configuration you showed before, you did not define any special behaviour
> to
> > happen when the profile "default-code-coverage" is active.
> >
> > On Fri, Jun 10, 2011 at 11:29 AM, David Durham
> > <da...@gmail.com>wrote:
> >
> >  > I think the statement "profiles are not inherited" is not strictly
> >  > true. Activation with <file> does not work on an inherited basis.
> >  > But direct activation at the command line with -P does work, even if
> >  > the profile is defined in a parent pom.
> >  >
> >  > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <
> Roland.Asmann@adesso.at>
> >  > wrote:
> >  > > OK, so why isn't this one activated? It should be imho...
> >  > >
> >  > >
> >  > > On 10.06.2011 15:53, Stephen Connolly wrote:
> >  > >> profiles are not inherited... the results of activating them in the
> >  > >> reactor are inherited
> >  > >>
> >  > >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at>
> wrote:
> >  > >> > Hi all,
> >  > >> >
> >  > >> > I have this profile defined in a parent-POM:
> >  > >> >
> >  > >> > <profile>
> >  > >> > <id>default-code-coverage</id>
> >  > >> > <activation>
> >  > >> > <file>
> >  > >> > <exists>src/main/java</exists>
> >  > >> > </file>
> >  > >> > </activation>
> >  > >> > </profile>
> >  > >> >
> >  > >> > Now, in several child-projects it will not be activated, because
> >  > there
> >  > >> > are no sources (WAR, EAR or simple resource-projects). However,
> > it is
> >  > >> > also not working on the projects that DO have sources...
> >  > >> >
> >  > >> > Can anybody tell me what I am doing wrong here?
> >  > >> >
> >  > >> > I'm running Maven 2.2.1.
> >  > >> >
> >  > >> > Thanks.
> >  > >> >
> >  > >> > --
> >  > >> > Roland Asmann
> >  > >> > Senior Software Engineer
> >  > >> >
> >  > >> > adesso Austria GmbH
> >  > >> > Floridotower 26. Stock T +43 1 2198790-27
> >  > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
> >  > >> > A-1210 Wien M +43 664 88657566
> >  > >> > E roland.asmann@adesso.at
> >  > >> > W www.adesso.at
> >  > >> >
> >  > >> > -------------------------------------------------------------
> >  > >> > >>> business. people. technology. <<<
> >  > >> > -------------------------------------------------------------
> >  > >> >
> >  > >> >
> > ---------------------------------------------------------------------
> >  > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >  > >> > For additional commands, e-mail: users-help@maven.apache.org
> >  > >> >
> >  > >> >
> >  > >>
> >  > >>
> ---------------------------------------------------------------------
> >  > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >  > >> For additional commands, e-mail: users-help@maven.apache.org
> >  > >>
> >  > >
> >  > > --
> >  > > Roland Asmann
> >  > > Senior Software Engineer
> >  > >
> >  > > adesso Austria GmbH
> >  > > Floridotower 26. Stock T +43 1 2198790-27
> >  > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
> >  > > A-1210 Wien M +43 664 88657566
> >  > > E roland.asmann@adesso.at
> >  > > W www.adesso.at
> >  > >
> >  > > -------------------------------------------------------------
> >  > > >>> business. people. technology. <<<
> >  > > -------------------------------------------------------------
> >  > >
> >  > >
> ---------------------------------------------------------------------
> >  > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >  > > For additional commands, e-mail: users-help@maven.apache.org
> >  > >
> >  > >
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >  > For additional commands, e-mail: users-help@maven.apache.org
> >  >
> >  >
> >
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock              T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> A-1210 Wien                         M +43 664 88657566
>                                    E roland.asmann@adesso.at
>                                    W www.adesso.at
>
> -------------------------------------------------------------
>             >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
It is not being activated, because the plugin I have defined (cobertura) 
doesn't run. I think it is quite obviously that this means that the 
profile isn't activated...


On 10.06.2011 16:40, Rafael Vanderlei wrote:
> David, when we say "profiles are not inherited" it´s because it is really
> not inherited.. I mean.. if you define a profile in a parent with lots of
> configurations and then you define a profile with the same name in a child
> the configuration defined in the parent is not applyied to the child. The
> child has a new brand profile that happens to have the same name of the
> profile defined in the parent.
>
> And because they have the same name, they both get activated by -P, but they
> are two different profiles, each one with its own configuration.
>
> @Roland what makes you say profile is not being activated? For the
> configuration you showed before, you did not define any special behaviour to
> happen when the profile "default-code-coverage" is active.
>
> On Fri, Jun 10, 2011 at 11:29 AM, David Durham
> <da...@gmail.com>wrote:
>
>  > I think the statement "profiles are not inherited" is not strictly
>  > true. Activation with <file> does not work on an inherited basis.
>  > But direct activation at the command line with -P does work, even if
>  > the profile is defined in a parent pom.
>  >
>  > On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <Ro...@adesso.at>
>  > wrote:
>  > > OK, so why isn't this one activated? It should be imho...
>  > >
>  > >
>  > > On 10.06.2011 15:53, Stephen Connolly wrote:
>  > >> profiles are not inherited... the results of activating them in the
>  > >> reactor are inherited
>  > >>
>  > >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
>  > >> > Hi all,
>  > >> >
>  > >> > I have this profile defined in a parent-POM:
>  > >> >
>  > >> > <profile>
>  > >> > <id>default-code-coverage</id>
>  > >> > <activation>
>  > >> > <file>
>  > >> > <exists>src/main/java</exists>
>  > >> > </file>
>  > >> > </activation>
>  > >> > </profile>
>  > >> >
>  > >> > Now, in several child-projects it will not be activated, because
>  > there
>  > >> > are no sources (WAR, EAR or simple resource-projects). However,
> it is
>  > >> > also not working on the projects that DO have sources...
>  > >> >
>  > >> > Can anybody tell me what I am doing wrong here?
>  > >> >
>  > >> > I'm running Maven 2.2.1.
>  > >> >
>  > >> > Thanks.
>  > >> >
>  > >> > --
>  > >> > Roland Asmann
>  > >> > Senior Software Engineer
>  > >> >
>  > >> > adesso Austria GmbH
>  > >> > Floridotower 26. Stock T +43 1 2198790-27
>  > >> > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  > >> > A-1210 Wien M +43 664 88657566
>  > >> > E roland.asmann@adesso.at
>  > >> > W www.adesso.at
>  > >> >
>  > >> > -------------------------------------------------------------
>  > >> > >>> business. people. technology. <<<
>  > >> > -------------------------------------------------------------
>  > >> >
>  > >> >
> ---------------------------------------------------------------------
>  > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > >> > For additional commands, e-mail: users-help@maven.apache.org
>  > >> >
>  > >> >
>  > >>
>  > >> ---------------------------------------------------------------------
>  > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > >> For additional commands, e-mail: users-help@maven.apache.org
>  > >>
>  > >
>  > > --
>  > > Roland Asmann
>  > > Senior Software Engineer
>  > >
>  > > adesso Austria GmbH
>  > > Floridotower 26. Stock T +43 1 2198790-27
>  > > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>  > > A-1210 Wien M +43 664 88657566
>  > > E roland.asmann@adesso.at
>  > > W www.adesso.at
>  > >
>  > > -------------------------------------------------------------
>  > > >>> business. people. technology. <<<
>  > > -------------------------------------------------------------
>  > >
>  > > ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > > For additional commands, e-mail: users-help@maven.apache.org
>  > >
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > For additional commands, e-mail: users-help@maven.apache.org
>  >
>  >
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Rafael Vanderlei <ra...@gmail.com>.
David, when we say "profiles are not inherited" it´s because it is really
not inherited.. I mean.. if you define a profile in a parent with lots of
configurations and then you define a profile with the same name in a child
the configuration defined in the parent is not applyied to the child. The
child has a new brand profile that happens to have the same name of the
profile defined in the parent.

And because they have the same name, they both get activated by -P, but they
are two different profiles, each one with its own configuration.

@Roland what makes you say profile is not being activated? For the
configuration you showed before, you did not define any special behaviour to
happen when the profile "default-code-coverage" is active.

On Fri, Jun 10, 2011 at 11:29 AM, David Durham <da...@gmail.com>wrote:

> I think the statement "profiles are not inherited" is not strictly
> true.  Activation with <file> does not work on an inherited basis.
> But direct activation at the command line with -P does work, even if
> the profile is defined in a parent pom.
>
> On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <Ro...@adesso.at>
> wrote:
> > OK, so why isn't this one activated? It should be imho...
> >
> >
> > On 10.06.2011 15:53, Stephen Connolly wrote:
> >> profiles are not inherited... the results of activating them in the
> >> reactor are inherited
> >>
> >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
> >>  > Hi all,
> >>  >
> >>  > I have this profile defined in a parent-POM:
> >>  >
> >>  > <profile>
> >>  > <id>default-code-coverage</id>
> >>  > <activation>
> >>  > <file>
> >>  > <exists>src/main/java</exists>
> >>  > </file>
> >>  > </activation>
> >>  > </profile>
> >>  >
> >>  > Now, in several child-projects it will not be activated, because
> there
> >>  > are no sources (WAR, EAR or simple resource-projects). However, it is
> >>  > also not working on the projects that DO have sources...
> >>  >
> >>  > Can anybody tell me what I am doing wrong here?
> >>  >
> >>  > I'm running Maven 2.2.1.
> >>  >
> >>  > Thanks.
> >>  >
> >>  > --
> >>  > Roland Asmann
> >>  > Senior Software Engineer
> >>  >
> >>  > adesso Austria GmbH
> >>  > Floridotower 26. Stock              T +43 1 2198790-27
> >>  > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> >>  > A-1210 Wien                         M +43 664 88657566
> >>  >                                    E roland.asmann@adesso.at
> >>  >                                    W www.adesso.at
> >>  >
> >>  > -------------------------------------------------------------
> >>  > >>> business. people. technology. <<<
> >>  > -------------------------------------------------------------
> >>  >
> >>  > ---------------------------------------------------------------------
> >>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>  > For additional commands, e-mail: users-help@maven.apache.org
> >>  >
> >>  >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
> > --
> > Roland Asmann
> > Senior Software Engineer
> >
> > adesso Austria GmbH
> > Floridotower 26. Stock              T +43 1 2198790-27
> > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> > A-1210 Wien                         M +43 664 88657566
> >                                    E roland.asmann@adesso.at
> >                                    W www.adesso.at
> >
> > -------------------------------------------------------------
> >             >>> business. people. technology. <<<
> > -------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Why is this profile not being activated?

Posted by Stephen Connolly <st...@gmail.com>.
if the mojo requires a forked lifecycle, making skip work is harder

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 11 Jun 2011 04:43, "Wayne Fay" <wa...@gmail.com> wrote:
>> True. Simple explanation is that I don't want the plugin to run on our
>> integration-tests, because they do a lot of stuff during the phase
> ...
>> way. That, or telling the plugin *not* to run, but this is not an option
>> on the plugin... :-(
>
> Perhaps an easier route to a solution on this one is to ADD this
> option to the plugin...? Plugin code is generally pretty simple and
> the majority of them are open source.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: Why is this profile not being activated?

Posted by Wayne Fay <wa...@gmail.com>.
> True. Simple explanation is that I don't want the plugin to run on our
> integration-tests, because they do a lot of stuff during the phase
...
> way. That, or telling the plugin *not* to run, but this is not an option
> on the plugin... :-(

Perhaps an easier route to a solution on this one is to ADD this
option to the plugin...? Plugin code is generally pretty simple and
the majority of them are open source.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
True. Simple explanation is that I don't want the plugin to run on our 
integration-tests, because they do a lot of stuff during the phase 
'generate-test-resources' and 'process-test-resources'. And since these 
tests don't have sources, I figured using a profile would be the easiest 
way. That, or telling the plugin *not* to run, but this is not an option 
on the plugin... :-(


On 10-06-11 23:14, Wendy Smoak wrote:
> On Fri, Jun 10, 2011 at 5:09 PM, Asmann, Roland<Ro...@adesso.at>  wrote:
>>   From what I've seen, the 'skip' parameter only exists on the
>> instrument-plugin, not on the report. I don't want it to trigger the
>> 'cobertura'-lifecycle, because this will trigger some other plugins that
>> are *very* slow.
>>
>> The reason I want this configured in the parent, is that I can't
>> influence all child-projects and I don't want to force all developers to
>> change much in their POMs. They are already chagrined that they have to
>> extend my POM, although they are starting to see the use of a common
>> parent...
>
> Still... it seems like whatever problem you're having, it's not about
> profile activation, it's more about getting something fixed in the
> Cobertura plugin, so that it does not 'kill the performance' of your
> build.
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Jun 10, 2011 at 5:09 PM, Asmann, Roland <Ro...@adesso.at> wrote:
>  From what I've seen, the 'skip' parameter only exists on the
> instrument-plugin, not on the report. I don't want it to trigger the
> 'cobertura'-lifecycle, because this will trigger some other plugins that
> are *very* slow.
>
> The reason I want this configured in the parent, is that I can't
> influence all child-projects and I don't want to force all developers to
> change much in their POMs. They are already chagrined that they have to
> extend my POM, although they are starting to see the use of a common
> parent...

Still... it seems like whatever problem you're having, it's not about
profile activation, it's more about getting something fixed in the
Cobertura plugin, so that it does not 'kill the performance' of your
build.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
 From what I've seen, the 'skip' parameter only exists on the 
instrument-plugin, not on the report. I don't want it to trigger the 
'cobertura'-lifecycle, because this will trigger some other plugins that 
are *very* slow.

The reason I want this configured in the parent, is that I can't 
influence all child-projects and I don't want to force all developers to 
change much in their POMs. They are already chagrined that they have to 
extend my POM, although they are starting to see the use of a common 
parent...

On 10-06-11 23:01, Wendy Smoak wrote:
> On Fri, Jun 10, 2011 at 10:40 AM, Asmann, Roland
> <Ro...@adesso.at>  wrote:
>
>> I also don't want the plugin in there (cobertura) to run everytime,
>> because on some of my modules (which have only no sources, that's why I
>> wanted to activate this way) it kills the performance with the
>> alternative life-cycle!
>
> Is this the problem you're actually trying to solve?
>
> The Cobertura plugin has a 'skip' parameter.  In the modules where you
> *don't* want it to run, configure it to skip execution.
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Jun 10, 2011 at 10:40 AM, Asmann, Roland
<Ro...@adesso.at> wrote:

> I also don't want the plugin in there (cobertura) to run everytime,
> because on some of my modules (which have only no sources, that's why I
> wanted to activate this way) it kills the performance with the
> alternative life-cycle!

Is this the problem you're actually trying to solve?

The Cobertura plugin has a 'skip' parameter.  In the modules where you
*don't* want it to run, configure it to skip execution.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
Still, my question remains: WHY isn't this profile activated?

I don't want to have to add it to the command-line. This is a parent 
that will be used company-wide and I don't want all developers to have 
to add a profile to their command-lines.

I also don't want the plugin in there (cobertura) to run everytime, 
because on some of my modules (which have only no sources, that's why I 
wanted to activate this way) it kills the performance with the 
alternative life-cycle!

There has got to be a way to get around this problem...


On 10.06.2011 16:29, David Durham wrote:
> I think the statement "profiles are not inherited" is not strictly
> true. Activation with <file> does not work on an inherited basis.
> But direct activation at the command line with -P does work, even if
> the profile is defined in a parent pom.
>
> On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland
> <Ro...@adesso.at> wrote:
>  > OK, so why isn't this one activated? It should be imho...
>  >
>  >
>  > On 10.06.2011 15:53, Stephen Connolly wrote:
>  >> profiles are not inherited... the results of activating them in the
>  >> reactor are inherited
>  >>
>  >> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
>  >> > Hi all,
>  >> >
>  >> > I have this profile defined in a parent-POM:
>  >> >
>  >> > <profile>
>  >> > <id>default-code-coverage</id>
>  >> > <activation>
>  >> > <file>
>  >> > <exists>src/main/java</exists>
>  >> > </file>
>  >> > </activation>
>  >> > </profile>
>  >> >
>  >> > Now, in several child-projects it will not be activated, because there
>  >> > are no sources (WAR, EAR or simple resource-projects). However, it is
>  >> > also not working on the projects that DO have sources...
>  >> >
>  >> > Can anybody tell me what I am doing wrong here?
>  >> >
>  >> > I'm running Maven 2.2.1.
>  >> >
>  >> > Thanks.
>  >> >
>  >> > --
>  >> > Roland Asmann
>  >> > Senior Software Engineer
>  >> >
>  >> > adesso Austria GmbH
>  >> > Floridotower 26. Stock              T +43 1 2198790-27
>  >> > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
>  >> > A-1210 Wien                         M +43 664 88657566
>  >> >                                    E roland.asmann@adesso.at
>  >> >                                    W www.adesso.at
>  >> >
>  >> > -------------------------------------------------------------
>  >> > >>> business. people. technology. <<<
>  >> > -------------------------------------------------------------
>  >> >
>  >> > ---------------------------------------------------------------------
>  >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >> > For additional commands, e-mail: users-help@maven.apache.org
>  >> >
>  >> >
>  >>
>  >> ---------------------------------------------------------------------
>  >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  >> For additional commands, e-mail: users-help@maven.apache.org
>  >>
>  >
>  > --
>  > Roland Asmann
>  > Senior Software Engineer
>  >
>  > adesso Austria GmbH
>  > Floridotower 26. Stock              T +43 1 2198790-27
>  > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
>  > A-1210 Wien                         M +43 664 88657566
>  >                                    E roland.asmann@adesso.at
>  >                                    W www.adesso.at
>  >
>  > -------------------------------------------------------------
>  > >>> business. people. technology. <<<
>  > -------------------------------------------------------------
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > For additional commands, e-mail: users-help@maven.apache.org
>  >
>  >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by David Durham <da...@gmail.com>.
I think the statement "profiles are not inherited" is not strictly
true.  Activation with <file> does not work on an inherited basis.
But direct activation at the command line with -P does work, even if
the profile is defined in a parent pom.

On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland <Ro...@adesso.at> wrote:
> OK, so why isn't this one activated? It should be imho...
>
>
> On 10.06.2011 15:53, Stephen Connolly wrote:
>> profiles are not inherited... the results of activating them in the
>> reactor are inherited
>>
>> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
>>  > Hi all,
>>  >
>>  > I have this profile defined in a parent-POM:
>>  >
>>  > <profile>
>>  > <id>default-code-coverage</id>
>>  > <activation>
>>  > <file>
>>  > <exists>src/main/java</exists>
>>  > </file>
>>  > </activation>
>>  > </profile>
>>  >
>>  > Now, in several child-projects it will not be activated, because there
>>  > are no sources (WAR, EAR or simple resource-projects). However, it is
>>  > also not working on the projects that DO have sources...
>>  >
>>  > Can anybody tell me what I am doing wrong here?
>>  >
>>  > I'm running Maven 2.2.1.
>>  >
>>  > Thanks.
>>  >
>>  > --
>>  > Roland Asmann
>>  > Senior Software Engineer
>>  >
>>  > adesso Austria GmbH
>>  > Floridotower 26. Stock              T +43 1 2198790-27
>>  > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
>>  > A-1210 Wien                         M +43 664 88657566
>>  >                                    E roland.asmann@adesso.at
>>  >                                    W www.adesso.at
>>  >
>>  > -------------------------------------------------------------
>>  > >>> business. people. technology. <<<
>>  > -------------------------------------------------------------
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>  > For additional commands, e-mail: users-help@maven.apache.org
>>  >
>>  >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock              T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> A-1210 Wien                         M +43 664 88657566
>                                    E roland.asmann@adesso.at
>                                    W www.adesso.at
>
> -------------------------------------------------------------
>             >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by "Asmann, Roland" <Ro...@adesso.at>.
OK, so why isn't this one activated? It should be imho...


On 10.06.2011 15:53, Stephen Connolly wrote:
> profiles are not inherited... the results of activating them in the
> reactor are inherited
>
> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
>  > Hi all,
>  >
>  > I have this profile defined in a parent-POM:
>  >
>  > <profile>
>  > <id>default-code-coverage</id>
>  > <activation>
>  > <file>
>  > <exists>src/main/java</exists>
>  > </file>
>  > </activation>
>  > </profile>
>  >
>  > Now, in several child-projects it will not be activated, because there
>  > are no sources (WAR, EAR or simple resource-projects). However, it is
>  > also not working on the projects that DO have sources...
>  >
>  > Can anybody tell me what I am doing wrong here?
>  >
>  > I'm running Maven 2.2.1.
>  >
>  > Thanks.
>  >
>  > --
>  > Roland Asmann
>  > Senior Software Engineer
>  >
>  > adesso Austria GmbH
>  > Floridotower 26. Stock              T +43 1 2198790-27
>  > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
>  > A-1210 Wien                         M +43 664 88657566
>  >                                    E roland.asmann@adesso.at
>  >                                    W www.adesso.at
>  >
>  > -------------------------------------------------------------
>  > >>> business. people. technology. <<<
>  > -------------------------------------------------------------
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  > For additional commands, e-mail: users-help@maven.apache.org
>  >
>  >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is this profile not being activated?

Posted by Rafael Vanderlei <ra...@gmail.com>.
Like Stephen said, profiles are not inherited. That being said, you would
need to replicate the profile activation in all children poms

<profile>
  <id>default-code-coverage</id>
  <activation>
    <file>
      <exists>src/main/java</exists>
    </file>
  </activation>
</profile>

But as you would probably put this profiles only in those children that
actually have "src/main/java", I believe you could take this activation
config out and activate the profile with -Pdefault-code-coverage

On Fri, Jun 10, 2011 at 10:53 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> profiles are not inherited... the results of activating them in the
> reactor are inherited
>
> On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
> > Hi all,
> >
> > I have this profile defined in a parent-POM:
> >
> > <profile>
> >   <id>default-code-coverage</id>
> >   <activation>
> >     <file>
> >       <exists>src/main/java</exists>
> >     </file>
> >   </activation>
> > </profile>
> >
> > Now, in several child-projects it will not be activated, because there
> > are no sources (WAR, EAR or simple resource-projects). However, it is
> > also not working on the projects that DO have sources...
> >
> > Can anybody tell me what I am doing wrong here?
> >
> > I'm running Maven 2.2.1.
> >
> > Thanks.
> >
> > --
> > Roland Asmann
> > Senior Software Engineer
> >
> > adesso Austria GmbH
> > Floridotower 26. Stock              T +43 1 2198790-27
> > Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> > A-1210 Wien                         M +43 664 88657566
> >                                    E roland.asmann@adesso.at
> >                                    W www.adesso.at
> >
> > -------------------------------------------------------------
> >             >>> business. people. technology. <<<
> > -------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Why is this profile not being activated?

Posted by Stephen Connolly <st...@gmail.com>.
profiles are not inherited... the results of activating them in the
reactor are inherited

On 10 June 2011 14:48, Asmann, Roland <Ro...@adesso.at> wrote:
> Hi all,
>
> I have this profile defined in a parent-POM:
>
> <profile>
>   <id>default-code-coverage</id>
>   <activation>
>     <file>
>       <exists>src/main/java</exists>
>     </file>
>   </activation>
> </profile>
>
> Now, in several child-projects it will not be activated, because there
> are no sources (WAR, EAR or simple resource-projects). However, it is
> also not working on the projects that DO have sources...
>
> Can anybody tell me what I am doing wrong here?
>
> I'm running Maven 2.2.1.
>
> Thanks.
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock              T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> A-1210 Wien                         M +43 664 88657566
>                                    E roland.asmann@adesso.at
>                                    W www.adesso.at
>
> -------------------------------------------------------------
>             >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org