To open m2eclipse preferences, navigate to Window | Preferences. In the Preferences window and search for maven
in the filter textbox as follows:
Click on Maven as shown in the screenshot that follows later; it allows us to set the following options for Maven:
Discovery is used to discover the m2e connectors available for use. Please refer to the Checking out a Maven project section in Chapter 3, Creating and Importing Projects, on how we used this feature.
Archetypes allows us to add, remove, and edit the Maven archetype catalog, as shown in the following screenshot:
For more information on archetypes, please refer to http://maven.apache.org/archetype/index.html.
User Interface allows us to set XML file options, as shown in the following screenshot:
The settings.xml
file contains elements used to define values that configure Maven execution in various ways, such as the pom.xml
file. The settings
file is at $ {M2_HOME}/settings.xml
, where M2_HOME
is {USER_HOME}/.m2
. In the Local Repository section of Chapter 3, Creating and Importing Projects, we use this file to set the alternate local repository other than the default one.
User Settings allows us to use the custom settings file and re-index the local repository, as shown in the following screenshot:
For more information on settings, please refer to http://maven.apache.org/settings.html#Servers.
Installations shows Maven installations and allows us to choose the Maven to use. We used it to set the external Maven installation in the Setting Maven to Use section of Chapter 2, Installing m2Eclipse; please refer to it for more details.
Warnings allows us to enable/disable the warning for a duplicate group ID and version across the parent-child POM. At the time of writing this, though this option is enabled, m2eclipse still complains about duplicates; hopefully, this feature will work in days to come with other new releases.
Templates shows the list of all the templates used by Maven. It also provides an option to add new templates, edit, remove, import, and export the templates, as shown in the following screenshot:
Lifecycle Mappings allows us to customize the project build lifecycle for Maven projects used by m2eclipse. This feature is still experimental at the time of writing this book; hence, we will limit its discussion.
For more information, please refer to http://wiki.eclipse.org/M2E_plugin_execution_not_covered.
18.217.147.193