Eclipse is a very good IDE. In addition to basic features such as syntax highlighting, code completion, andXML editing, the latest version of Eclipse supports refactoring and integrates popular tools such as JUnit, CVS, Mylyn, and more.
Unfortunately , Eclipse does not have integrated support for MAVEN by default . Fortunately, Sonatype, the founder of Maven's father Jason Van Zyl, established the M2eclipse project, a very powerful maven plugin under Eclipse, You can visit http://m2eclipse.sonatype.org/to learn more about the project.
First, through the connection installation.
1. After launching Eclipse, select Help in the menu bar and select Install New software...,
2. Next you will see an Install dialog box, click on the work with : field side of the Add button ,
3. You will get a new Add Repository dialog box, enter m2ein the Name field,enter http://In the Location field M2ECLIPSE.SONATYPE.ORG/SITES/M2E, then click OK.
Warm tip: The address has now been changed to: Http://download.eclipse.org/technology/m2e/releases.
4. eclipse will download The resource information on the M2eclipse installation site. Wait for the resource to be loaded and we can see it all unfold.
5. shows the core modules of m2eclipse maven Integration for Eclipse (Required), select and click next; , eclipse automatically calculates the inter-module dependency and then gives a list of modules to be installed, confirming that it is correct, and then continue clicking next > , we will see the license information, m2eclipse use the Open source license is eclipse public License v1.0, select i accept the terms of the license agreements , and then click finish , and then patiently waits for eclipse to download and install the modules.
6. In addition to the core components,M2eclipse provides a set of additional components, primarily for ease of integration with other tools such as subversion, where the installation address is http:// M2eclipse.sonatype.org/sites/m2e-extras.
Second, install through Eclipse Marketplace.
1. Click the Eclipse menu bar Help->eclipse Marketplace to search for the plugin maven integration for Eclipse and click Install.
2. Select the plug-in you want to install.
Third, by downloading the plug-in, offline installation.
Issue: An offline installation is required when the Eclipse online installation maven plugin is experiencing problems.
Premise: believe that you have installed and configured the Jdk,maven (not the plugin) and eclipse in your computer. Installing the MAVEN plugin offline to eclipse, most importantly, requires a m2eclipse plug-in package.
1. First, click Download Offline install package.
Download Link: Https://yunpan.cn/c3IWhW99URjhI access password C6DD
2. Unzip the M2eclipse plug-in package
After downloading the M2eclipse plugin package to local decompression, the features and plugins folders will appear.
The directory path is best not to contain Chinese or white space. The following uses%maven-plugin% to represent the root directory where the plug-in is decompressed. As the F:\maven here
Extracted directory:
3. New Links folder
Create a new Links folder under Eclipse's installation directory, as follows:
4. Create a new Maven.link file and add the plug-in location.
Create a new text file within the Links folder and rename it to Maven.link. Open Maven.link with a text editor and edit it to add the following:
Path=f:/maven
Note: The value of path specifies the path to the%maven-plugin% where the path delimiter is to be saved and closed using "/" or "\ \".
5. Edit the Eclipse.ini configuration file.
This is because Eclipse is running on the JRE by default, and some features of M2eclipse require the use of the JDK, and the workaround is to configure the Eclipse.ini file for the Eclipse installation directory to add VM configuration point to JDK
Locate the Eclipse.ini configuration file in the current directory and open it with a text editor and edit it:
-VmC:/program Files/java/jdk1.7.0_17/bin/javaw.exe
Replace it with the installation directory of your native JDK. Save and close.
6. Check whether the installation is successful.
Open Eclipse (if Eclipse has started, restart it), find the menu Window--Preferences
If you can see the Maven tab, the plug-in installation is successful.
7. Switch to the path of the MAVEN installation.
Expand Menu Maven--installations, click Add on the right side of the panel ... button, pop Up the dialog box, click Directory ... button, in the Pop-up dialog box, select the root path of your Maven installation, as follows:
Select OK and click the OK button to return to the parent dialog box and click the Finish button. Go back to the main panel and don't forget to tick it, as follows:
8. Set up Maven's settings.xml file
Menu Maven--User Settings, click Browse on the right ... button, select the Settings.xml file under your Maven installation path in the Pop-up dialog box
Before changing:
After the change:
Click the OK button, and the Eclipse Maven plugin installation configuration is complete.
You can create MAVEN projects by right-to-------MAVEN project.
Windows environment Eclipse (online + offline) installs Maven's M2eclipse plugin