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 > <stephen.alan.conno...@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 <roland.asm...@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 > >>> <roland.asm...@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 > >>> > > <david.durham...@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.asm...@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 > <roland.asm...@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.asm...@adesso.at > >>> > > > >> > W www.adesso.at > >>> > > > >> > > >>> > > > >> > > ------------------------------------------------------------- > >>> > > > >> > >>> business. people. technology. <<< > >>> > > > >> > > ------------------------------------------------------------- > >>> > > > >> > > >>> > > > >> > > >>> > > > --------------------------------------------------------------------- > >>> > > > >> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >>> > > > >> > For additional commands, e-mail: users-h...@maven.apache.org > >>> > > > >> > > >>> > > > >> > > >>> > > > >> > >>> > > > >> > >>> > --------------------------------------------------------------------- > >>> > > > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >>> > > > >> For additional commands, e-mail: users-h...@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.asm...@adesso.at > >>> > > > > W www.adesso.at > >>> > > > > > >>> > > > > ------------------------------------------------------------- > >>> > > > > >>> business. people. technology. <<< > >>> > > > > ------------------------------------------------------------- > >>> > > > > > >>> > > > > > >>> > --------------------------------------------------------------------- > >>> > > > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >>> > > > > For additional commands, e-mail: users-h...@maven.apache.org > >>> > > > > > >>> > > > > > >>> > > > > >>> > > > > --------------------------------------------------------------------- > >>> > > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >>> > > > For additional commands, e-mail: users-h...@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.asm...@adesso.at > >>> > W www.adesso.at > >>> > > >>> > ------------------------------------------------------------- > >>> > >>> business. people. technology. <<< > >>> > ------------------------------------------------------------- > >>> > > >>> > --------------------------------------------------------------------- > >>> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >>> > For additional commands, e-mail: users-h...@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.asm...@adesso.at > >> W www.adesso.at > >> > >> ------------------------------------------------------------- > >> >>> business. people. technology. <<< > >> ------------------------------------------------------------- > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@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.asm...@adesso.at W www.adesso.at ------------------------------------------------------------- >>> business. people. technology. <<< ------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org