You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adam Hardy <ad...@cyberspaceroad.com> on 2006/09/04 13:26:24 UTC

deactivating a profile

I'm trying to use two profiles and to switch between them for occasionally.

I've seen a couple of emails on this in the archives which don't resolve 
this issue for me so here is my problem:

(1) if I set one profile to <activation><activeByDefault>true ... then I 
cannot de-activate it by any means. Is this intended?

(2) on windows, <activation><file><missing>c:/this-profile.txt</.... 
doesn't work for me. I wanted to use it in combination with <exists> on 
the second profile, so that I could create or delete the file to toggle 
the profiles.

(3) the most practical way at the moment is to use the command line 
-PmyProfile parameter, but it seems tedious with the knowledge that I 
should be able to make it automatic.


Can anyone give me some insight into this problem?

Thanks
Adam

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


Re: deactivating a profile

Posted by Alexander Sack <pi...@gmail.com>.
I have the same needs though I use ANT to call Maven from Eclipse and switch
command line parameters to switch profiles.  Not sure if this is best
practices but it sure works nicely for me!  :D

-aps

On 9/4/06, Alexis Midon <al...@gmail.com> wrote:
>
> Hi Adam,
>
> we've got the same needs.
> Unfortunately I haven't found out the way to do this.
>
> As a result I use the "activate by property" feature. But event his way
> doesn't not work smoothly.
> Actually in a parent pom, if I set the property activate.profile1 for
> example, its value is correctly passed to the child poms but nevertheless
> profile1 is not active! :(
> Only the property set in the command line makes it work.
>
> Hope this helps,
>
> Alexis
>
> On 9/4/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
> >
> > I'm trying to use two profiles and to switch between them for
> > occasionally.
> >
> > I've seen a couple of emails on this in the archives which don't resolve
> > this issue for me so here is my problem:
> >
> > (1) if I set one profile to <activation><activeByDefault>true ... then I
> > cannot de-activate it by any means. Is this intended?
> >
> > (2) on windows, <activation><file><missing>c:/this-profile.txt</....
> > doesn't work for me. I wanted to use it in combination with <exists> on
> > the second profile, so that I could create or delete the file to toggle
> > the profiles.
> >
> > (3) the most practical way at the moment is to use the command line
> > -PmyProfile parameter, but it seems tedious with the knowledge that I
> > should be able to make it automatic.
> >
> >
> > Can anyone give me some insight into this problem?
> >
> > Thanks
> > Adam
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>


-- 
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson

Re: deactivating a profile

Posted by Alexis Midon <al...@gmail.com>.
Hi Adam,

we've got the same needs.
Unfortunately I haven't found out the way to do this.

As a result I use the "activate by property" feature. But event his way
doesn't not work smoothly.
Actually in a parent pom, if I set the property activate.profile1 for
example, its value is correctly passed to the child poms but nevertheless
profile1 is not active! :(
Only the property set in the command line makes it work.

Hope this helps,

Alexis

On 9/4/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>
> I'm trying to use two profiles and to switch between them for
> occasionally.
>
> I've seen a couple of emails on this in the archives which don't resolve
> this issue for me so here is my problem:
>
> (1) if I set one profile to <activation><activeByDefault>true ... then I
> cannot de-activate it by any means. Is this intended?
>
> (2) on windows, <activation><file><missing>c:/this-profile.txt</....
> doesn't work for me. I wanted to use it in combination with <exists> on
> the second profile, so that I could create or delete the file to toggle
> the profiles.
>
> (3) the most practical way at the moment is to use the command line
> -PmyProfile parameter, but it seems tedious with the knowledge that I
> should be able to make it automatic.
>
>
> Can anyone give me some insight into this problem?
>
> Thanks
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>