You need to do -P+base,+override
I think On Fri, Sep 12, 2008 at 1:01 AM, Stephen Connolly < [EMAIL PROTECTED]> wrote: > activation on the comandline will disable any defaults. > > there is (added at some stage not sure what maven version) the ability to > add and remove with -P+otherProfile or -P-otherProfile > > > On Fri, Sep 12, 2008 at 12:34 AM, EJ Ciramella <[EMAIL PROTECTED]>wrote: > >> So with further research, if within a single pom, you have an >> activeByDefault plugin and one that you're activating by specifying an >> ID on the commandline, the activeByDefault one is ignored. >> >> Additionally, I set up three profiles, two of which are active by >> default and when you activate the third profile, the other two are >> deactivated. >> >> When did this change? This seems broken.... >> >> -----Original Message----- >> From: EJ Ciramella [mailto:[EMAIL PROTECTED] >> Sent: Thursday, September 11, 2008 7:03 PM >> To: Maven Users List >> Subject: RE: Property access from a plugin >> >> Can you give me an example of what you're talking about? >> >> The properties that are coming from this profile are used for filtering >> other files during process-resources. If I do a >> mavenProject().getProperties() the missing properties are not listed... >> >> The <activeByDefault> profile is truly active: >> >> System.out.println(mavenProject.getActiveProfiles()); >> >> Yields: >> >> E:\work\>mvn process-resources -Dtest=asdf -Pbase,override >> [INFO] Scanning for projects... >> [INFO] >> --------------------------------------------------------------------- >> [INFO] Building Backoffice Process >> [INFO] task-segment: [process-resources] >> [INFO] >> --------------------------------------------------------------------- >> [INFO] [prop-override:override {execution: default}] >> [ >> Profile {id: common-defaults, source: pom} >> Profile {id: base, source: settings.xml} >> Profile {id: proxies, source: settings.xml} >> Profile {id: proxies, source: settings.xml} >> ] >> [INFO] [dependency:unpack-dependencies {execution: unpack}] >> [INFO] lty-utils-resources-1.0.0.16.jar already exists in destination. >> [INFO] [resources:resources] >> [INFO] Using default encoding to copy filtered resources. >> [INFO] [antrun:run {execution: default}] >> [INFO] Executing tasks >> [INFO] Executed tasks >> [INFO] >> --------------------------------------------------------------------- >> [INFO] BUILD SUCCESSFUL >> [INFO] >> --------------------------------------------------------------------- >> [INFO] Total time: 9 seconds >> [INFO] Finished at: Thu Sep 11 18:42:39 EDT 2008 >> [INFO] Final Memory: 13M/26M >> [INFO] >> --------------------------------------------------------------------- >> >> Additionally, in the commandline specified above, do you notice the >> -Pbase,override? >> >> Base is a profile in my settings.xml, override is in the pom at the root >> of the project (the parent pom). Override is a plugin INSIDE a profile. >> Common-defaults is also a profile inside the root level pom (override >> and common-defaults are right next to each other) - where to activate >> override, you have to either specify -Doverride or -Poverride and >> common-defaults is activeByDefault - why would activating manually ONE >> profile deactivate another one? Maven shows it's active (see my snippet >> above), but it's truly NOT putting the properties stored in it into >> play. >> >> -----Original Message----- >> From: Stephen Connolly [mailto:[EMAIL PROTECTED] >> Sent: Thursday, September 11, 2008 6:39 PM >> To: Maven Users List >> Subject: Re: Property access from a plugin >> >> On Thu, Sep 11, 2008 at 11:33 PM, EJ Ciramella >> <[EMAIL PROTECTED]>wrote: >> >> > So what's happening is, I'm activating a few profiles, yet the >> > properties that are missing are set in an <activeByDefault> profile. >> It >> > appears that the <activeByDefault> profile is either not activated or >> > ignored. >> > >> > If I turn on this profile (along with my other profiles), the >> properties >> > are expanded properly. >> > >> > My plugin is simply loading some properties from a property file and >> > pushing them into the mavenProject property listing. >> > >> > So two questions: >> > >> > 1 - do I need to do anything special to load all the properties >> defined >> > in any activeByDefault profiles? >> > >> > 2 - What lifecycle goal should I bind my plugin to? >> > >> >> The earliest possible phase (validate AFAIK) >> >> Note that any properties that are required _while_ building the model >> cannot >> be supplied by your plugin as your plugin will only run after the model >> has >> been constructed... making your plugin less useful than you'd think in >> most >> cases >> >> >> > >> > -----Original Message----- >> > From: EJ Ciramella [mailto:[EMAIL PROTECTED] >> > Sent: Thursday, September 11, 2008 5:05 PM >> > To: users@maven.apache.org >> > Subject: Property access from a plugin >> > >> > If you have a set of properties set within a profile that is active by >> > default, programmatically, how do you access them? >> > >> > >> > >> > If I do help:effective-pom, I can see that they are set and if I do >> > help:active-profiles, I can see the profile is also active, just when >> I >> > list the properties, the are not set. >> > >> > >> > >> > My plugin is defined as an aggregate plugin bound to process-sources >> (so >> > POST initialize). >> > >> > >> > >> > mavenProject.getProperties() shows them as unset, any suggestions? >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >