You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Collin Peters <cp...@intouchtechnology.com> on 2010/02/19 22:08:46 UTC
Simple profile question
At least I hope it is simple. I am struggling trying to accomplish what I
thought would be a basic task
If I have four profiles: A, B, C, and D. A should be active by default
unless B is active and C should be active by default unless D is active. Is
this possible?
>From what I understand <activeByDefault> profiles automatically deactivate
if one other profile is active. So if I activate B, *both* A and C will
deactivate.
What I want to be able to do is to provide sensible defaults so developers
don't need to know which profiles to activate on their local boxes (since
99% of the time they don't need to activate any profiles). However, the
above scenario is example of where this breaks down quickly. Any pointers
would be appreciated
Regards,
Collin Peters
Re: Simple profile question
Posted by Collin Peters <cp...@intouchtechnology.com>.
Well... that is our use case. I guess what I did not mention (but is
implicit) is that there are essentially two mutually exclusive groups here.
I see now that there is no support for this as there are tickets regarding
grouping of profiles.
I did manage to solve my use case, however. I switched my approach from
using profile IDs to active the profile, to using parameters/properties on
the command line. So profile A is activated by the absence of a parameter,
and profile B is activated by the presence of a parameter. Likewise for
profiles C and D.
I hope there are plans to increase the flexibility of profiles in future
releases. Perhaps the Hamcrest API could easily provide this.
Regards,
Collin
On Fri, Feb 19, 2010 at 4:44 PM, Tobias Gierke <
tobias.gierke@code-sourcery.de> wrote:
>
> Why do you need to have 4 different profiles ?
>
> Regards,
> Tobias
>
Re: Simple profile question
Posted by Tobias Gierke <to...@code-sourcery.de>.
Collin Peters wrote:
> At least I hope it is simple. I am struggling trying to accomplish what I
> thought would be a basic task
>
> If I have four profiles: A, B, C, and D. A should be active by default
> unless B is active and C should be active by default unless D is active. Is
> this possible?
>
> From what I understand <activeByDefault> profiles automatically deactivate
> if one other profile is active. So if I activate B, *both* A and C will
> deactivate.
>
> What I want to be able to do is to provide sensible defaults so developers
> don't need to know which profiles to activate on their local boxes (since
> 99% of the time they don't need to activate any profiles). However, the
> above scenario is example of where this breaks down quickly. Any pointers
> would be appreciated
>
Why do you need to have 4 different profiles ?
Regards,
Tobias
> Regards,
> Collin Peters
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org