You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Janecek Jan <ja...@kb.cz> on 2007/01/23 13:27:51 UTC

Activation a profile from another profile

Hi,
 
is it possible to trigger profile activation by activating another
profile? 
 
I have several profiles defined that can be divided to few sets that
have some parts in common. I would like to place these common parts in
different profiles. For example I would have profiles profile1,
profile2, profile3, profile4. profile1 and profile2 would have some
parts in common and the same is true for profile3 and profile4. I
thought I could define profileA (with common parts of profile1 and
profile2) and profileB (with common parts of profile3 and profile4).
Then when I activate profile1 (by setting a property) I need to have
profileA activated as well. Is this possible?
 
In my case I have builds for different application servers (JBoss and
WebSphere) and each of them has several installations. I try to
parametrize builds for a specific server installation. So in my case
profileA and profileB contain configuration for the server and
profile1,... adds further configuration for the specific installation.
Currently I use 2 properties, one for activation of profileA/profileB
and for profile1/profile2/... . But then it is necessary to specify both
variables when running Maven (and thats annoying) and obviously it is
possible to specify invalid combinations.
 
Regards,
Jan

 
 
Tento e-mail je urcen pouze pro jeho adresata/adresaty a muze obsahovat duverne informace, jejichz ochrana muze byt vyzadovana pravnimi predpisy.
Jestlize jste zpravu obdrzel(a) omylem, neprodlene informujte jejiho odesilatele a tuto zpravu, jeji prilohy a pripadne kopie ihned vymazte. Jakakoli forma uziti, zverejneni, reprodukce, kopirovani, distribuce a sireni teto zpravy je v takovem pripade zakazana.
Komercni banka, a.s., neodpovida za mozne skody zpusobene neuplnym prenosem, moznou modifikaci ci zpozdenim teto zpravy behem prenosu od odesilatele k adresatovi.


This e-mail transmission is intended solely for the ordinary user of the e-mail address to which it was addressed. It may contain legally privileged and/or confidential information. 
If you have received this e-mail in error or are not an intended recipient please inform the sender with-out delay and delete this e-mail, attachments and possible copies immediately. The unauthorised use, disclosure, distribution and/or copying of this e-mail or any information it contains is prohibited. 
Komercni banka, a. s., does not accept liability for any damage caused by incomplete transmission, possible modification or delay of this e-mail during the transmission from the sender to the recipient.


Re: Activation a profile from another profile

Posted by Wendy Smoak <ws...@gmail.com>.
On 2/1/07, Jochen Wiedmann <jo...@gmail.com> wrote:

> Anybode care to answer? I have the very same problem. (See the Jakarta
> commons-parent POM.)

I tried setting a property in one profile, and having another
activated by that property, but that didn't work.  (I didn't expect it
to-- it would either have to depend on order or take multiple passes.
And I'm not even sure those are the same "type" of properties.)

I'm used to specifying multiple profiles:  "-P env-local,db-test".
Yes, there are invalid combinations, for example 'env-deploy,db-devl'
doesn't make a lot of sense, but it never caused a problem.

-- 
Wendy

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


Re: Activation a profile from another profile

Posted by Jochen Wiedmann <jo...@gmail.com>.
Anybode care to answer? I have the very same problem. (See the Jakarta
commons-parent POM.)


On 1/23/07, Janecek Jan <ja...@kb.cz> wrote:
> Hi,
>
> is it possible to trigger profile activation by activating another
> profile?
>
> I have several profiles defined that can be divided to few sets that
> have some parts in common. I would like to place these common parts in
> different profiles. For example I would have profiles profile1,
> profile2, profile3, profile4. profile1 and profile2 would have some
> parts in common and the same is true for profile3 and profile4. I
> thought I could define profileA (with common parts of profile1 and
> profile2) and profileB (with common parts of profile3 and profile4).
> Then when I activate profile1 (by setting a property) I need to have
> profileA activated as well. Is this possible?
>
> In my case I have builds for different application servers (JBoss and
> WebSphere) and each of them has several installations. I try to
> parametrize builds for a specific server installation. So in my case
> profileA and profileB contain configuration for the server and
> profile1,... adds further configuration for the specific installation.
> Currently I use 2 properties, one for activation of profileA/profileB
> and for profile1/profile2/... . But then it is necessary to specify both
> variables when running Maven (and thats annoying) and obviously it is
> possible to specify invalid combinations.
>
> Regards,
> Jan
>
>
>
> Tento e-mail je urcen pouze pro jeho adresata/adresaty a muze obsahovat duverne informace, jejichz ochrana muze byt vyzadovana pravnimi predpisy.
> Jestlize jste zpravu obdrzel(a) omylem, neprodlene informujte jejiho odesilatele a tuto zpravu, jeji prilohy a pripadne kopie ihned vymazte. Jakakoli forma uziti, zverejneni, reprodukce, kopirovani, distribuce a sireni teto zpravy je v takovem pripade zakazana.
> Komercni banka, a.s., neodpovida za mozne skody zpusobene neuplnym prenosem, moznou modifikaci ci zpozdenim teto zpravy behem prenosu od odesilatele k adresatovi.
>
>
> This e-mail transmission is intended solely for the ordinary user of the e-mail address to which it was addressed. It may contain legally privileged and/or confidential information.
> If you have received this e-mail in error or are not an intended recipient please inform the sender with-out delay and delete this e-mail, attachments and possible copies immediately. The unauthorised use, disclosure, distribution and/or copying of this e-mail or any information it contains is prohibited.
> Komercni banka, a. s., does not accept liability for any damage caused by incomplete transmission, possible modification or delay of this e-mail during the transmission from the sender to the recipient.
>
>
>


-- 
How fast can a year go? As fast as your childs first year.

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