Chapter 3. Maven Configuration
Maven maintains its configuration at three different levels: global, user, and project. This chapter discusses how to customize Maven configuration at all three levels for optimal use:
- The global-level configuration is maintained at
MAVEN_HOME/conf/settings.xml
- The user-level configuration is maintained at
USER_HOME/.m2/settings.xml
- The project-level configuration is maintained at
PROJECT_HOME/pom.xml
Note
The
settings.xml
file is the God of all Maven configurations. The XML schema of the configuration elements defined insettings.xml
is available at http://maven.apache.org/xsd/settings-1.0.0.xsd. The following snippet shows a high-level outline of thesettings.xml
file:<settings> <localRepository/> <interactiveMode/> <usePluginRegistry/> <offline/> <pluginGroups/> <servers/> <mirrors/> <proxies/> <profiles/> <activeProfiles/> </settings>
As we proceed with this...