Preface
This document uses the link method instead of installing the Maven plug-in online. Link
To facilitate the management of Eclipse plug-ins, so that a lot of things are not stored in the plugins directory.
The author's eclipse version is
Indigo Release, Eclipse Java ee ide for Web Developers.
1. Download
Maven 2
Apache Official Website: http://maven.apache.org/download.html, select the latest Maven 2.0.11 binary
Zip package apache-maven-2.0.11-bin.zip for download (author is using
Apache-maven-2.0.11-bin.zip, which has been uploaded to Csdn resources. Yes: http://download.csdn.net/detail/defonds/4487376 ).
2. Install Maven 2
Download
The apache-maven-2.0.11-bin.zip is extracted to the directory of your frequently used software, for example, the author put it under the D:/tools directory. Maven
Is not installed.
3. Maven 2 local library settings
Open Maven 2 in step 2
In the conf file under the installation directory, add the localRepository label under the settings tab as follows:
<LocalRepository> D:/javaprojects/mlib </localRepository>
Note: D:/javaprojects/mlib is the absolute path of your local library.
4. Download Maven
Plug-ins
The author has uploaded the Maven plug-in of the m2e-0.12.0.20101115-1102 version to Csdn
Resource: http://download.csdn.net/detail/defonds/4487410410.
5. decompress the package to obtain the Maven plug-in.
Decompress the m2e.zip file downloaded in step 1 to obtain
M2e-0.12.0.20101115-1102 files with the features directory, plugins directory, artifacts. xml and
Content. xml.
6. Create a plug-in folder
In Eclipse
Create the plug-in folder plugins_dir under the installation directory and copy the m2e-0.12.0.20101115-1102 obtained in step 1 to plugins_dir
Directory.
7. Create a links folder
In Eclipse
Create a new plug-in folder links under the installation directory, create a file m2e-0.12.0.20101115-1102.link under the links directory, edit its content as follows:
Path =
Plugins_dir/m2e-0.12.0.20101115-1102
Note: The relative path is used. The above path indicates
The m2e-0.12.0.20101115-1102 under the plugins_dir folder under the Eclipse installation directory.
8.
Restart Eclipse
Restart Eclipse, Window-> Preferences, and add Maven to the menu tree on the left.
To verify that the installation is successful.
9. Eclipse Maven Configuration
Eclipse-> Window-> Preferences-> Maven-> Installations-> Add...
Maven directory-> User Settings-> specify the Maven Configuration File settings. xml.
So far, Maven 2
After installing the Eclipse plug-in, you can right-click the Package Explorer view to create a Maven 2 project.
Note: For some existing Maven 2 projects in Eclipse, follow the above steps to display Maven
The local library path is incorrect. This is because the new configuration has not yet taken effect for them. Right-click the project name and select Disable Dependency from the Maven menu.
Management. Then, right-click the project name and select Enable Dependency Management from the Maven menu.
You can. At this time, the project directs to the new Maven 2 local library.
Reproduced in: http://blog.csdn.net/defonds/article/details/7847446