Why can’t I activate a Maven2 profile from another profile?

The feature simply doesn’t exist. The property activator uses the incoming properties, not anything set by the profiles (as otherwise it wouldn’t know what order to activate them in without some more complex logic).

The solution you used, of have identical properties to activate the things you want to do together, is the best solution. I realise that may not always be satisfactory – in that case all you can do is fall back to making the individual profiles as simple as possible so that you can combine them in the ways you want on the command line, without duplicating things across them.

The issue covering this feature is: https://issues.apache.org/jira/browse/MNG-3309

The issue covering the property activation is: https://issues.apache.org/jira/browse/MNG-2276

Leave a Comment