|
Hi
I would like to activate (or not) a profile in my settings.xml base don which profile is active in my pom.xml. The active profile is determined by either activated by default, or by setting a -P argument to maven. How can I do this? In my pom.xml I also set a <env>production</env> in my production profile and so on, can I use this to activate profiles in settings.xml, or how do I do this? Med venlig hilsen / Kind regards Søren Krogh Neigaard Systems Engineer Søren Frichs Vej 39, 8000 Aarhus C Denmark Mobile +4541965252 [hidden email] www.systematic.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
profile activation is based on _SYSTEM_ properties.
you cannot activate profiles based on properties defined in your pom you cannot activate profiles based on system properties defined after the build plan has started execution -Stephen On 2 July 2010 08:37, Søren Krogh Neigaard < [hidden email]> wrote: > Hi > > I would like to activate (or not) a profile in my settings.xml base don > which profile is active in my pom.xml. The active profile is determined by > either activated by default, or by setting a -P argument to maven. How can I > do this? > > In my pom.xml I also set a <env>production</env> in my production profile > and so on, can I use this to activate profiles in settings.xml, or how do I > do this? > > Med venlig hilsen / Kind regards > > > Søren Krogh Neigaard > Systems Engineer > > Søren Frichs Vej 39, 8000 Aarhus C > Denmark > > Mobile +4541965252 > [hidden email] > www.systematic.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > |
|
Hm alright, are there really no way that I can, based on my active profile, specify what properties to use or not use from my settings.xml? I mean, I have different filters to filter in the correct values here and there based on my active profile, but a few values are specific pr. Developer and are therefore in each developers settings.xml, but when I make a build for a testserver or other server then I want to overwrite the values defined in settings.xml.
Please help :) Med venlig hilsen / Kind regards Søren Krogh Neigaard Systems Engineer Søren Frichs Vej 39, 8000 Aarhus C Denmark Mobile +4541965252 [hidden email] www.systematic.com -----Original Message----- From: Stephen Connolly [mailto:[hidden email]] Sent: 2. juli 2010 10:52 To: Maven Users List Subject: Re: Activating a profile in settings.xml based on a property set in pom.xml? profile activation is based on _SYSTEM_ properties. you cannot activate profiles based on properties defined in your pom you cannot activate profiles based on system properties defined after the build plan has started execution -Stephen On 2 July 2010 08:37, Søren Krogh Neigaard < [hidden email]> wrote: > Hi > > I would like to activate (or not) a profile in my settings.xml base don > which profile is active in my pom.xml. The active profile is determined by > either activated by default, or by setting a -P argument to maven. How can I > do this? > > In my pom.xml I also set a <env>production</env> in my production profile > and so on, can I use this to activate profiles in settings.xml, or how do I > do this? > > Med venlig hilsen / Kind regards > > > Søren Krogh Neigaard > Systems Engineer > > Søren Frichs Vej 39, 8000 Aarhus C > Denmark > > Mobile +4541965252 > [hidden email] > www.systematic.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
I think a concrete example of what you want to do would be helpful.
You can certainly use profiles to selectively activate sections in settings.xml, but I don't understand what you mean by "I would like to activate (or not) a profile in my settings.xml based on which profile is active in my pom.xml" ... if you are using mvn -P then you can just specify them both? On Fri, Jul 2, 2010 at 2:23 AM, Søren Krogh Neigaard <[hidden email]> wrote: > Hm alright, are there really no way that I can, based on my active profile, specify what properties to use or not use from my settings.xml? I mean, I have different filters to filter in the correct values here and there based on my active profile, but a few values are specific pr. Developer and are therefore in each developers settings.xml, but when I make a build for a testserver or other server then I want to overwrite the values defined in settings.xml. > > Please help :) > > -----Original Message----- > From: Stephen Connolly [mailto:[hidden email]] > Sent: 2. juli 2010 10:52 > To: Maven Users List > Subject: Re: Activating a profile in settings.xml based on a property set in pom.xml? > > profile activation is based on _SYSTEM_ properties. > > you cannot activate profiles based on properties defined in your pom > > you cannot activate profiles based on system properties defined after the > build plan has started execution > > -Stephen > > On 2 July 2010 08:37, Søren Krogh Neigaard < > [hidden email]> wrote: > >> Hi >> >> I would like to activate (or not) a profile in my settings.xml base don >> which profile is active in my pom.xml. The active profile is determined by >> either activated by default, or by setting a -P argument to maven. How can I >> do this? >> >> In my pom.xml I also set a <env>production</env> in my production profile >> and so on, can I use this to activate profiles in settings.xml, or how do I >> do this? >> >> Med venlig hilsen / Kind regards >> >> >> Søren Krogh Neigaard >> Systems Engineer >> >> Søren Frichs Vej 39, 8000 Aarhus C >> Denmark >> >> Mobile +4541965252 >> [hidden email] >> www.systematic.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
On 10 July 2010 08:20, Zac Thompson <[hidden email]> wrote:
> I think a concrete example of what you want to do would be helpful. > You can certainly use profiles to selectively activate sections in > settings.xml, but I don't understand what you mean by "I would like to > activate (or not) a profile in my settings.xml based on which profile > is active in my pom.xml" ... if you are using mvn -P then you can just > specify them both? Or just use the same profile name in both? > On Fri, Jul 2, 2010 at 2:23 AM, Søren Krogh Neigaard > <[hidden email]> wrote: >> Hm alright, are there really no way that I can, based on my active profile, specify what properties to use or not use from my settings.xml? I mean, I have different filters to filter in the correct values here and there based on my active profile, but a few values are specific pr. Developer and are therefore in each developers settings.xml, but when I make a build for a testserver or other server then I want to overwrite the values defined in settings.xml. >> >> Please help :) >> >> -----Original Message----- >> From: Stephen Connolly [mailto:[hidden email]] >> Sent: 2. juli 2010 10:52 >> To: Maven Users List >> Subject: Re: Activating a profile in settings.xml based on a property set in pom.xml? >> >> profile activation is based on _SYSTEM_ properties. >> >> you cannot activate profiles based on properties defined in your pom >> >> you cannot activate profiles based on system properties defined after the >> build plan has started execution >> >> -Stephen >> >> On 2 July 2010 08:37, Søren Krogh Neigaard < >> [hidden email]> wrote: >> >>> Hi >>> >>> I would like to activate (or not) a profile in my settings.xml base don >>> which profile is active in my pom.xml. The active profile is determined by >>> either activated by default, or by setting a -P argument to maven. How can I >>> do this? >>> >>> In my pom.xml I also set a <env>production</env> in my production profile >>> and so on, can I use this to activate profiles in settings.xml, or how do I >>> do this? >>> >>> Med venlig hilsen / Kind regards >>> >>> >>> Søren Krogh Neigaard >>> Systems Engineer >>> >>> Søren Frichs Vej 39, 8000 Aarhus C >>> Denmark >>> >>> Mobile +4541965252 >>> [hidden email] >>> www.systematic.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Søren Krogh Neigaard
Am 02.07.2010 um 09:37 schrieb Søren Krogh Neigaard:
> Hi > > I would like to activate (or not) a profile in my settings.xml base don which profile is active in my pom.xml. The active profile is determined by either activated by default, or by setting a -P argument to maven. How can I do this? > > In my pom.xml I also set a <env>production</env> in my production profile and so on, can I use this to activate profiles in settings.xml, or how do I do this? Hello, we sometimes use a trigger file or directory to achieve this, e.g. a profile is activated if the directory "profiles" or an empty file WITH_SSL exist in the project. By this means we need to set an environment variable. Regards Mirko --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
| Powered by Nabble | Edit this page |
