Maven Project Build-eclipse version

Source: Internet
Author: User

First, Maven Introduction

MAVEN is a project management tool for project building (mvn clean install), dependency management (central Warehouse, Nexus) and project information management based on the Java platform.

MAVEN is based on the Project object Model (POM), is declarative, the project build process and process all phases of the work required by the plug-in implementation, and most of the plug-ins are ready, developers only need to declare the basic elements of the project, MAVEN executes the built-in, complete build process. This eliminates duplication to a large extent. Here you can compare make and ant, both of which are procedural, the developer needs to display a specified target, and the tasks that need to be performed to complete the goal. For each project, developers need to rewrite the process.

Ii. Construction of the project

1. Download maven

From the official website (http://maven.apache.org/download.cgi#) Download the name of "Apache-maven-3.3.3-bin.zip" compressed package, extracted to the C drive.

Catalog Results


2. Create a local warehouse

The MAVEN default local warehouse location is the ". M2/repository" under the current user's working directory, which in the process will result in more and more files in this directory, so we will typically replace them with other disk directories. Need to do two steps, the first step in the D disk to build a folder for storing files (here I built a "D:\maven-3.3.3-bobo\repository" path file), the second step, in the Maven extracted files in the Conf folder, Modify the settings file. Add this sentence

<localRepository>D:\maven-3.3.3-bobo\repository</localRepository>

3. Configuring Maven in Eclipse

Open "Window→preferences→maven", select Installations, and click "Add" to select the extracted Maven path. Tick the path you want to use.


Then, click "User Settings", in the golbalsettings and user Settings, select the Settings file under the Conf folder. Click on the "Updatesettings" button.



4. How to create a maven project with eclipse

Right-click to select New→other→maven→next


→next


→next


The basic structure of the MAVEN project:


Third, summary

In this article, just a simple description of how to build a Maven project in Eclipse, although I've been doing projects with Maven before, but like Maven, it's basically customized and has a quick development manual, so I feel a little bit confused about Maven, These two days find time, specialized research, always not next time problem, do not know where to start the good, tomorrow will continue to share with you some of my learning Maven knowledge points, welcome all kinds of shooting bricks!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Maven Project Build-eclipse version

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.