I have a project that has several profiles. How do you make one of the profiles activate only if no other profiles are active?
+7
A:
As explained in Introduction to Build Profiles:
Profiles can also be active by default using a configuration like the following:
<profiles> <profile> <id>profile-1</id> <activation> <activeByDefault>true</activeByDefault> </activation> ... </profile> </profiles>
This profile will automatically be active for all builds unless another profile in the same pom is activated using one of the previously described methods. All profiles that are active by default are automatically deactivated when a profile in the pom is activated on the command line or through its activation config.
Pascal Thivent
2009-09-17 01:15:04
Oh, thanks for clarifying! I thought activeByDefault meant that it will always be active.
aberrant80
2009-09-17 02:06:30