Maven learning process Record-Preliminary 2

Source: Internet
Author: User

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>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.