m2eclipse preferences

To open m2eclipse preferences, navigate to Window | Preferences. In the Preferences window and search for maven in the filter textbox as follows:

m2eclipse preferences

Maven

Click on Maven as shown in the screenshot that follows later; it allows us to set the following options for Maven:

  • Offline: This option will not check the central repository for updates
  • Debug Output: This option sets Maven in the debug mode
  • Download Artifact Sources: This option downloads sources to local repositories such as JAR
  • Download Artifact Javadoc: This option downloads the javadoc to the local repository
  • Update Maven projects on startup: This option updates the dependencies of the Maven project
  • Hide folders of physically nested modules (experimental): This option is in the experimental mode, which hides the nested folders of a multimodule project
Maven

Discovery

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

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.

Archetypes

User Interface and User Settings

User Interface allows us to set XML file options, as shown in the following screenshot:

User Interface and User Settings

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:

User Interface and User Settings

For more information on settings, please refer to http://maven.apache.org/settings.html#Servers.

Installations

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

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

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:

Templates

Lifecycle Mappings

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.147.193