How to set up a MAVEN project import MyEclipse
(2013-01-06 12:17:50)
Reproduced
Label: Zatan |
Category: Maven |
My myeclipse8.5 directly create the standard of the project is not successful, on the Internet to find information to check, completed the summary of this information, convenient later to better solve more about using myeclipse8.5 to create a standard MAVEN project.
"1" First step: Download a free install version of Apache-maven-3.0.3.zip after decompression, configure environment variables
New M2_home:
Add%m2_home%\bin after path;
"2" Second step: Compile check environment is configured correctly; Mvn-v
"3" Step three: Mycelipse key self-installing local maven
First: Modify the <settings> node in the Apache-maven-3.0.3\conf\settings.xml to add the following sentence
<localRepository>D:\software\mavenFactory</localRepository>
The mavenfactory in "D:\software\mavenFactory" allows us to set up an empty folder for storing the repository of jar packages.
Next Open the Mycelipse:
Then associate the address that you just added to save the local jar package into MyEclipse
New M2_repo
window-->preferences-->myeclipse--> Maven4meclipse Select Enable
Next:
Window-->preferences-->myeclipse--> maven4meclipse-->maven-->installations
Click Add to add the Maven of our own installation and check it out.
Then:
Window-->preferences-->myeclipse-->maven4meclipse-->maven-->user Settings
At this point maven has been associated with myelipse;
"4" Step fourth: After the configuration is successful, start building a Web-based MAVEN project
DOS command:
MVN Archetype:create-dgroupid=com-dartifactid=certusweb-darchetypeartifactid=maven-archetype-webapp
Go to the newly created MAVEN project directory: Certusweb
The above MAVEN project is converted into a mycelipse project.
MVN eclipse:myeclipse-dwtpversion=2.0 (back-dwtpversion=2.0 must be added)
After three steps above a MAVEN project was basically built successfully, the following import MyEclipse;
"5" Fifth Step: MyEclipse import Maven Project
File----> Import--->exsiting projectsinto Workspace--->browse Select the MAVEN project you just created
In this case, we found a little Red fork on the MAVEN project because we were not connected to Maven.
"6" Step sixth: Maven in association MyEclipse
Right-click on the project name--->maven4meclipse--->enable Dependency Management;
At this point we found that the upper left corner of the project has an M sign. Created success on behalf of MAVEN project;
How to set up a MAVEN project import MyEclipse