Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 234EF4D20 for ; Fri, 10 Jun 2011 20:39:52 +0000 (UTC) Received: (qmail 21749 invoked by uid 500); 10 Jun 2011 20:39:49 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 21677 invoked by uid 500); 10 Jun 2011 20:39:49 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 21669 invoked by uid 99); 10 Jun 2011 20:39:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 20:39:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Roland.Asmann@adesso.at designates 85.22.140.15 as permitted sender) Received: from [85.22.140.15] (HELO mx1.adesso.de) (85.22.140.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 20:39:42 +0000 Received: from localhost (localhost [127.0.0.1]) by mx1.adesso.de (Postfix) with ESMTP id 32A9B37E076 for ; Fri, 10 Jun 2011 22:39:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at adesso.de Received: from mx1.adesso.de ([127.0.0.1]) by localhost (mx1.adesso.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i0eXiBBA2hjI for ; Fri, 10 Jun 2011 22:39:21 +0200 (CEST) Received: from smgw.adesso.de (smgw.adesso.de [172.20.20.16]) by mx1.adesso.de (Postfix) with ESMTP id CF1D837E066 for ; Fri, 10 Jun 2011 22:39:21 +0200 (CEST) Received: from smgw.adesso.de (localhost [127.0.0.1]) by smgw.adesso.de (Postfix) with ESMTP id DD83C1FC046 for ; Fri, 10 Jun 2011 22:39:39 +0200 (CEST) Received: from dams-ex01.adesso.local (gw-do-ext.adesso.de [172.20.20.1]) by smgw.adesso.de (Postfix) with ESMTP id D10BD1FC03B for ; Fri, 10 Jun 2011 22:39:39 +0200 (CEST) Received: from dams-ex01.adesso.local ([fe80::b094:b006:9635:6577]) by dams-ex01.adesso.local ([fe80::b094:b006:9635:6577%10]) with mapi; Fri, 10 Jun 2011 22:39:21 +0200 From: "Asmann, Roland" To: "users@maven.apache.org" Date: Fri, 10 Jun 2011 22:39:18 +0200 Subject: Re: Why is this profile not being activated? Thread-Topic: Why is this profile not being activated? Thread-Index: AcwnrnmE5xBwMM5eQ8ylypDBDdQkxA== Message-ID: <4DF280F6.2040908@adesso.at> References: <4DF2209C.1070305@adesso.at> <4DF22447.6030608@adesso.at> <4DF22D7A.40802@adesso.at> <4DF2312D.8090004@adesso.at> In-Reply-To: Accept-Language: en-US, de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 acceptlanguage: en-US, de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TBoneOriginalFrom: "Asmann, Roland" X-TBoneOriginalTo: "users@maven.apache.org" X-TBoneDomainSigned: false X-Virus-Checked: Checked by ClamAV on apache.org Could this be dependent on the version of Maven? Might I ask which=20 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 > 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 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 thi= s > >> on the project being build. > >> > >> Clearly I am missing something here which is obvious to all of you, s= o > >> 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 > >>> 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 th= e > >>> > profile isn't activated... > >>> > > >>> > > >>> > On 10.06.2011 16:40, Rafael Vanderlei wrote: > >>> > > David, when we say "profiles are not inherited" it=B4s because i= t is > >>> really > >>> > > not inherited.. I mean.. if you define a profile in a parent wit= h > >>> 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 t= he > >>> > > 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 > >>> > > wrote: > >>> > > > >>> > > > I think the statement "profiles are not inherited" is not > strictly > >>> > > > true. Activation with does not work on an inherited bas= is. > >>> > > > 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 the= m > >>> in the > >>> > > > >> reactor are inherited > >>> > > > >> > >>> > > > >> On 10 June 2011 14:48, Asmann, Roland > > >>> > wrote: > >>> > > > >> > Hi all, > >>> > > > >> > > >>> > > > >> > I have this profile defined in a parent-POM: > >>> > > > >> > > >>> > > > >> > > >>> > > > >> > default-code-coverage > >>> > > > >> > > >>> > > > >> > > >>> > > > >> > src/main/java > >>> > > > >> > > >>> > > > >> > > >>> > > > >> > > >>> > > > >> > > >>> > > > >> > 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.or= g > >>> > > > >> > 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.or= g > >>> > > > >> > >>> > > > > > >>> > > > > -- > >>> > > > > 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 > --=20 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