Book Image

Mastering Apache Maven 3

Book Image

Mastering Apache Maven 3

Overview of this book

Table of Contents (16 chapters)
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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 in settings.xml is available at http://maven.apache.org/xsd/settings-1.0.0.xsd. The following snippet shows a high-level outline of the settings.xml file:

    <settings>
      <localRepository/>
      <interactiveMode/>
      <usePluginRegistry/>
      <offline/>
      <pluginGroups/>
      <servers/>
      <mirrors/>
      <proxies/>
      <profiles/>
      <activeProfiles/>
    </settings>

As we proceed with this chapter, the...