m2e plugin settings

We can customize the behavior of the m2e plugin through the Eclipse preferences. From the main Eclipse menu, navigate to Windows | Preferences to open the preference window and then click on the item regarding Maven (see the following screenshot). Here we can see some global settings for the m2e plugin. Among these, maybe the most useful are the Download Artifact Sources and Download Artifact JavaDoc checkboxes, to enable automatic downloads of dependency sources and dependency Javadocs. The dependency sources and Javadocs will be integrated in the Eclipse IDE so they will be available during all our developing and debugging activities. To download them from the command line, we should invoke the Maven Dependency Plugin from the project directory as follows:

$ mvn dependency:sources
$ mvn dependency:resolve -Dclassifier=javadoc

We can see the preference window as shown in the following screenshot:

m2e plugin settings

Maven general preferences

We can also edit the Maven installation used by the m2e plugin by clicking on the Installations subitem of the Maven preferences. In fact, the m2e plugin comes with an embedded Maven runtime that can be changed with an external installation, as shown in the following screenshot:

m2e plugin settings

Maven installations

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

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