This question is ancient, but it seems the problem is solvable using activeProfile , not activeByDefault . I am on Maven 3.3.9, but the solution may work in earlier versions.
Just enter activeProfiles in your settings.xml , for example:
<settings> <profiles> [...] </profiles> <activeProfiles> <activeProfile>my-awesome-profile</activeProfile> </activeProfiles> </settings>
In my-awesome-profile I have settings, such as database URLs, etc., so they always apply. Here I activate the second profile, resolve-from-central :
$ mvn help:all-profiles -P resolve-from-central [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-help-plugin:2.2:all-profiles (default-cli) @ standalone-pom --- [INFO] Listing Profiles for Project: org.apache.maven:standalone-pom:pom:1 Profile Id: resolve-from-central (Active: true , Source: settings.xml) Profile Id: my-awesome-profile (Active: true , Source: settings.xml) Profile Id: resolve-from-internal (Active: false , Source: settings.xml)
Note that my-awesome-profile is still active. Hurrah!
inanutshellus Sep 15 '16 at 14:02 2016-09-15 14:02
source share