"Project Management and build" 10-minute tutorial, Eclipse configuration maven + create MAVEN project (iii)

Source: Internet
Author: User

In the Last post we described maven download, install and configure (ii), this post we configure Eclipse, combine it with MAVEN, and we create a MAVEN project.

Preparatory work

Before eclipse configures Maven, we need to be prepared to do the following:
1. Installing the JDK
2. MAVEN is installed and the MAVEN configuration is successful
3. Download Eclipse, unzip the installation, and create a workspace.
These things believe that everyone has pro, if not, please look at the last blog post, here is no longer tired of the description.

Eclipse Configuration Maven

Check that the Maven plugin for Eclipse is installed successfully.

If the Maven plugin is not installed, we need to install the MAVEN plugin first.

Installing the MAVEN Plugin

The Eclipse installation plugin is used in two ways, online and offline. Both of these installation methods I recommend that you use offline, offline way more convenient, simple, the two installation methods on the Internet a lot of information, but also very simple, I will no longer be tired of the statement. Recommend an article to everyone:

Several ways to install the Eclipse Maven plugin

Configure Maven
    1. Configuring the MAVEN installation directory
      Open window–> perferences–> maven in turn, expand MAVEN's configuration interface, such as;

      Then click installations–> Add to select the Maven install directory, here my Maven install directory for D:\maven\apache-maven-3.2.3, select your Maven install directory and click OK, then click Apply , click OK to complete
    2. Then, we set the user Settings in the MAVEN configuration interface
      Global Settings Select Settings.xml under the Conf folder in the MAVEN installation directory, where my Maven installation directory is D:\maven\apache-maven-3.2.3\conf\ Settings.xml, select your Maven installation directory, check the local Repository entry, and if the configuration is successful for d:/maven/repository, reconfigure the previous step.

Congratulations, now that we've configured Eclipse, we're ready to create a MAVEN project.

Create a MAVEN project
    1. We'll click on the File->new->other->maven in the Eclipse menu bar and we'll see it in the popup dialog box, as shown in:
    2. Select Maven Project, check create a simple project (skip archetype selection), then click Next
    3. Fill in the group ID and artifact ID, version default, packaging default is Jar,name,description optional, others do not fill

Then click Finish to:


4. In the first three steps you can create a simple MAVEN project, if we want to create a MAVEN Web project, change the packaging type of the third step to war, then click Finish:

Congratulations, our MAVEN project has been created, simple.

Next blog post, we use Nexus to build a maven, so please look forward to it.

"Project Management and build" 10-minute tutorial, Eclipse configuration maven + create MAVEN project (iii)

Related Article

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.