So I keep getting: [WARNING] Overriding profile: 'documentation' (source: pom) with new instance from source: profiles.xml [WARNING] Overriding profile: 'dev-7777' (source: pom) with new instance from source: profiles.xml
I have tried with an without: <profile> <id>dev-7777</id> <properties> <env>dev-7777</env> <build.type>no-documentation</build.type> </properties> </profile> in my profiles.xml Basically, I am trying to do the following 2 things: 1. I want to run with the properties I set in my <properties> section if there is NOT a -P [profilename] specified: <properties> *<env>local</env> <build.type>no-documentation</build.type>* 2. If a profile is specified such as dev-7777, I want those settings to override the <properties> settings: <profile> <id>*documentation*</id> <properties> *<build.type>documentation</build.type>* </properties> </profile> <profile> <id*>dev-7777*</id> <properties> * <env>dev-7777</env> <build.type>no-documentation</build.type> * Then, I have a module group that has to have an activation switch on build.type like: <profile> <id>*documentation*</id> <modules> <module>business-services</module> <module>common-c2</module> </modules> </profile> <profile> <id>*no-documentation*</id> <activation> <property> *<name>build.type</name> <value>!documentation</value>* </property> </activation> <modules> *<module>bpel</module>* <module>business-services</module> <module>common-c2</module> </modules> </profile> The BPEL will fail the entire site:site process due to the nature of the Oracle bpel ant tasks. No way around this so I just don't want to run them if I plan to run site documentation. So here is what is happening: when I run *mvn package* or I run *mvn -P dev-7777 package* I get *dev-7778*used every time. It shows that ALL profiles are active, but only takes the last one which is dev-7778 not local or dev-7777 With this, no matter what, the* build.type* is never *documentation *as it appears that dev-7778 overrides that property. so my site:site fails every time. Even when I do a *mvn -P documentation site:site* On Dec 11, 2007 1:55 PM, Mick Knutson <[EMAIL PROTECTED]> wrote: > I keep getting this: > > > The following profiles are active: > > - local (source: settings.xml) > - local (source: settings.xml) > - local (source: settings.xml) > - dev-7777 (source: *profiles*.xml) > - documentation (source: *profiles*.xml) > - dev-7778 (source: *profiles*.xml) > > > > Not all of these profiles have been activated. Only local is active by > default. The other 3 profiles exist in profiles.xml , but have not been > activated. > > > > > > > On Dec 11, 2007 1:33 PM, Patrick Schneider <[EMAIL PROTECTED]> wrote: > > > I haven't seen those warnings before... > > > > Have you tried using help:active-profiles? Try: > > > > $ mvn -P dev-7777 help:active-profiles > > > > This will list (surprise!) the currently active profiles with which > > Maven is > > executing. > > > > > > Patrick > > > > On Dec 11, 2007 12:43 PM, Mick Knutson <[EMAIL PROTECTED]> wrote: > > > > > I am trying to switch profiles for each environment. > > > I have dev-7777, and dev-7778 > > > > > > Then in my profiles.xml I have: > > > > > > * <profile> > > > <id>dev-7777</id> > > > <properties> > > > <env>dev-7777</env> > > > <build.type>no-documentation</build.type> > > > </properties> > > > </profile> > > > > > > <profile> > > > <id>dev-7778</id> > > > <properties> > > > <env>dev-7778</env> > > > <build.type>no-documentation</build.type> > > > </properties> > > > </profile>* > > > > > > > > > *When I run:* > > > *mvn -P dev-7777 assembly:assembly -e -X > 7777.out.txt* > > > * > > > I keep getting this:* > > > > > > *[WARNING] Overriding profile: 'dev-7777' (source: pom) with new > > instance > > > from source: profiles.xml > > > [WARNING] Overriding profile: 'dev-7778' (source: pom) with new > > instance > > > from source: profiles.xml* > > > > > > > > > so it looks like I get both, but 7778 seems to always override 7777. I > > > only > > > want one of these profiles active at the same time. Can someone please > > > help > > > me out? > > > > > > > > > -- > > > Thanks, > > > Mick Knutson > > > > > > http://www.baselogic.com > > > http://www.blincmagazine.com > > > http://www.djmick.com > > > http://www.myspace.com/mickknutson > > > http://www.myspace.com/BLiNCMagazine > > > http://tahoe.baselogic.com > > > --- > > > > > > > > > -- > > Thanks, > Mick Knutson > > http://www.baselogic.com > http://www.blincmagazine.com > http://www.djmick.com > http://www.myspace.com/mickknutson > http://www.myspace.com/BLiNCMagazine > http://tahoe.baselogic.com > --- > -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---