Re: Maven 2 inheritance which elements get inherited ?

2009-01-29 Thread kukudas

Thanks i did that too but the profiles were missing so i wanted to be sure
and asked here.
Thanks for your help.

Jörg Schaible-2 wrote:
> 
> Hi kuku,
> 
> kukudas wrote at Mittwoch, 28. Januar 2009 15:20:
> 
>> 
>> Thanks, so when i activate a profile by using the command line (ex.: mvn
>> clean install -P int) within a child and the profile (int) is definied in
>> the parent it should work right?
> 
> Yes, but why don't you simply setup two minimal POMs and use "mvn
> effetive:pom" to explore the results ?
> 
> - Jörg
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-2-inheritance-which-elements-get-inherited---tp21701498p21722535.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Maven 2 inheritance which elements get inherited ?

2009-01-28 Thread Jörg Schaible
Hi kuku,

kukudas wrote at Mittwoch, 28. Januar 2009 15:20:

> 
> Thanks, so when i activate a profile by using the command line (ex.: mvn
> clean install -P int) within a child and the profile (int) is definied in
> the parent it should work right?

Yes, but why don't you simply setup two minimal POMs and use "mvn
effetive:pom" to explore the results ?

- Jörg


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



Re: Maven 2 inheritance which elements get inherited ?

2009-01-28 Thread kukudas

Thanks, so when i activate a profile by using the command line (ex.: mvn
clean install -P int) within a child and the profile (int) is definied in
the parent it should work right?

Jörg Schaible-2 wrote:
> 
> Hi kuku,
> 
> kukudas wrote at Mittwoch, 28. Januar 2009 13:37:
> 
>> 
>> Ok so lets say i have a profile in my parent which is not activated. If i
>> now call this profile with my child it will work right? I've tried it and
>> it seems to work but i'm asking to be sure.
> 
> No. If the profile is activated (i.e. by an activate element in the
> profile
> itself) in the child, none of the profile stuff of the parent is used.
> Parents are resolved first (incl. profiles). If you activate a profile
> from
> command line the case is different, then the profile activation happens
> before any of the POMs are resolved independently from an activate
> section.
> 
> - Jörg
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-2-inheritance-which-elements-get-inherited---tp21701498p21706617.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Maven 2 inheritance which elements get inherited ?

2009-01-28 Thread Jörg Schaible
Hi kuku,

kukudas wrote at Mittwoch, 28. Januar 2009 13:37:

> 
> Ok so lets say i have a profile in my parent which is not activated. If i
> now call this profile with my child it will work right? I've tried it and
> it seems to work but i'm asking to be sure.

No. If the profile is activated (i.e. by an activate element in the profile
itself) in the child, none of the profile stuff of the parent is used.
Parents are resolved first (incl. profiles). If you activate a profile from
command line the case is different, then the profile activation happens
before any of the POMs are resolved independently from an activate section.

- Jörg


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



Re: Maven 2 inheritance which elements get inherited ?

2009-01-28 Thread kukudas

Ok so lets say i have a profile in my parent which is not activated. If i now
call this profile with my child it will work right? I've tried it and it
seems to work but i'm asking to be sure.


Jörg Schaible-2 wrote:
> 
> Hi kuku,
> 
> kukudas wrote at Mittwoch, 28. Januar 2009 09:24:
> 
>> 
>> I have read in the documentation that the following elements get
>> inherited
>> (merged) :
>> 
>> * dependencies
>> * developers and contributors
>> * plugin lists (including reports)
>> * plugin executions with matching ids
>> * plugin configuration
>> * resources
>> 
>> Is it possible to inherit other elements too like certain profiles ?
>> Thanks in advance .. kuku
> 
> Profiles are not inherited, they get activated. I.e. if a profile get's
> activated in a parent pom, anything that is part of this profile
> definition
> will be inherited as if it had been declared outside of the profile.
> However, the activation of the profile is inherited i.e. if you child POM
> declares a profile with the same profile id but without any activation
> section, it is nevertheless active and you can add or modify other POM
> elements.
> 
> Those commands will help you to visualize the effects:
> 
> mvn help:active-profiles
> mvn help:effective-pom
> 
> - Jörg
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-2-inheritance-which-elements-get-inherited---tp21701498p21704915.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Maven 2 inheritance which elements get inherited ?

2009-01-28 Thread Jörg Schaible
Hi kuku,

kukudas wrote at Mittwoch, 28. Januar 2009 09:24:

> 
> I have read in the documentation that the following elements get inherited
> (merged) :
> 
> * dependencies
> * developers and contributors
> * plugin lists (including reports)
> * plugin executions with matching ids
> * plugin configuration
> * resources
> 
> Is it possible to inherit other elements too like certain profiles ?
> Thanks in advance .. kuku

Profiles are not inherited, they get activated. I.e. if a profile get's
activated in a parent pom, anything that is part of this profile definition
will be inherited as if it had been declared outside of the profile.
However, the activation of the profile is inherited i.e. if you child POM
declares a profile with the same profile id but without any activation
section, it is nevertheless active and you can add or modify other POM
elements.

Those commands will help you to visualize the effects:

mvn help:active-profiles
mvn help:effective-pom

- Jörg


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



Maven 2 inheritance which elements get inherited ?

2009-01-28 Thread kukudas

I have read in the documentation that the following elements get inherited
(merged) :

* dependencies
* developers and contributors
* plugin lists (including reports)
* plugin executions with matching ids
* plugin configuration
* resources

Is it possible to inherit other elements too like certain profiles ?
Thanks in advance .. kuku

-- 
View this message in context: 
http://www.nabble.com/Maven-2-inheritance-which-elements-get-inherited---tp21701498p21701498.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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