First, build MAVEN project:
1, first build directory D:\maven_test\maven\03
2, switch to the directory, run MVN archetype:generate command to create the project skeleton, will prompt: ' groupId ': input: Cn.edu.zttc.hello;
' Artifactid ': input: Hello-third;
' Version ': 1.0-snapshot:: input: 0.0.1SNAPSHOT;
' Package ': Input: Cn.edu.zttc.hello::
Enter the ' Y ' and the entire creation is successful.
Second, build Maven project with MyEclipse:
1. Set up MAVEN environment: find maven settings in MyEclipse Properties Preferences: 1) Set installations as: Dot Add, add D:\apache-maven-3.1.1-bin\ apache-maven-3.1.1; 2) set user settings to D:\java\maven\settings.xml (if you do not change the default central repository, that is the setting: C:\Documents and Settings\administrator\.m2\settings.xml).
2. Start a new MAVEN project: Right-click New, select Other, find Maven under MyEclipse, choose Maven Project, Then next choose Maven-archetype-quickstart after the next set groupid,artifactid,package and so on, finish the achievement OK.
3. You can also import the new Hello-third project into MyEclipse, and now test the MAVEN project with the imported Hello-third project:
Open Pom.xml, add the following dependency in the dependencies, you can put the front Hello-first module (Note: Hello-first module must be run MVN clean install publish to the warehouse) as a jar package automatically referenced to the project;
<dependency>
<groupId>cn.edu.zttc.hello</groupId>
<artifactId>hello-first</artifactId>
<version>SNAPSHOT-0.0.1</version>
</dependency>