External profiles defined with <activeByDefault>true</activeByDefault> are always activated even when explicitly requested to by deactivated (by including them in the MavenRequest.addInactiveProfiles(). I've seen this while embedding maven in Eclipse.
Looking at the code, it seems like that was not the intention (looks like an unplanned side effect to me), but I'm running the question here before creating a new ticket in JIRA. The long description is... - DefaultMavenProjectBuilder requests the active external profiles in line 721 by calling DefaultProfileAdvisor.applyActivatedExternalProfiles(). - applyActivatedExternalProfiles() delegates (line 99) into applyActivatedProfiles() - applyActivatedProfiles() delegates in DefaultProfileManager.getActiveProfiles() - getActiveProfiles() does it job and then, on line 240 checks if activeFromPom() is empty. - it always is! (for this call) since we are not looking for profiles defined in the pom - so all the profiles activeByDefault are added to the result, which ignores any explicit Inactivation. I think that an easy solution (if this is really a bug) would be to pass a flag to know when the profiles are being queried from the pom and when from external files. Thanks for your responses! ----- http://www.linkedin.com/in/amuino Abel Muiño Vizcaino - http://ramblingabout.wordpress.com http://ramblingabout.wordpress.com -- View this message in context: http://www.nabble.com/Possible-bug-activating-external-profiles--tp16531761s177p16531761.html Sent from the Maven Developers mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]