You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by raymond <rd...@domingo.nl> on 2011/04/20 08:54:00 UTC

profile activation

Hello,

I like to activate profiles from within a profile. (Or is there an other way
to achieve my goal ?)

For example I have multiple profiles which are activated in different
circumstances. Sometimes none of them are activated and sometimes more are
activated:
- integration-test-tomcat-profile
- integration-test-jetty-profile
- my-personal-special-profile
- company-special-profile
- exotic-verry-unknown-profile
- buildserver-profile

Our buildserver manager doesn't know any details about these profiles, he
just knows our buildserver-profile should be trigger when the buildserver
builds the project.

Normally I would use a property to activate the profile, but these profile
already have property activation. When I add a second property I have to set
both of them (or can I use OR somehow?), but my buildadmin only knows about
one. I don't wan't hem to know about the other properties.

It is up to the developer of the project to correctly configure the
'buildserver-profile'. This is why would like to configure (add) active
profiles from the 'buildserver-profile'.

I tried something like (in MyMojo):
public void execute() throws MojoExecutionException {
...
                Profile p = getProfile(allProfiles, profileId);
                p.setActivation(new AlwaysOnActivation());
                project.setActiveProfiles(updatedActiveProfiles);

But the added profiles aren't executed.
I don't feel this is the way to go, but I can't think of an alternative.

Any tips please ?

Best regards,
Raymond

--
View this message in context: http://maven.40175.n5.nabble.com/profile-activation-tp4315068p4315068.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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