3.4. Maven Settings file

The Maven settings file (settings.xml) is used to configure Maven execution. You can locate this file in the following locations:
  • In the Maven install directory at $M2_HOME/conf/settings.xml. These settings are called global settings.
  • In the user's install directory at ${user.home}/.m2/settings.xml. These settings are called user settings.
  • Folder location specified by the system property kie.maven.settings.custom.
Note that the actual settings used is a merge of the files located in these locations.
Here is an example of a Maven settings.xml file:
<settings>
    <profiles>
        <profile>
            <id>my-profile</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>fusesource</id>
                    <url>http://repo.fusesource.com/nexus/content/groups/public/</url>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                </repository>
                ...
            </repositories>
        </profile>
    </profiles>
    ...
</settings>
Here, the activeByDefault tag is used to activate the profile that specifies the remote repository.