Maven Learning Record

Source: Internet
Author: User

First, Brief introduction

Maven is a project building and management automation tool that makes it easy to manage the project lifecycle, including project jar dependencies, development, testing, publishing, packaging, and more.

Ii. Basic Concepts

2.1 Pom-Project object model

Full Name (Project object model)

2.2 Artifact-Project prototypes

That is, the project template

2.3 Repositories-Warehouse

Local repository: Developing a native jar package warehouse

Server repository: The storage of jar packages on the company's LAN servers

Central Warehouse: The central storage of jar packages on the Internet

2.4 Build Lifecycle-Build life cycle

Maven has a set of build lifecycles that come down in a sequence called a life cycle (lifecycle). Maven includes three lifecycles: default, clean, and site.

One life cycle is divided into multiple build phase (build phase), the following is the more important build phase of the default life cycle, other references: Maven–introduction to the build Lifecycle

Validate: Verify that the project is correct and that the necessary information is available

Compile: Compiling source code

Test: Testing the compiled code, i.e. executing the unit test code

Package: Packaging compiled code, generating the packages file under the target directory

Integration-test: Process The package so that it can be deployed to an integrated test environment when needed

Verify: Verify that the package is effective and meets quality standards

Install: Installs the package to the local warehouse, facilitates the local other project to use

Deployment: Deploy, Copy the final package to a remote repository and other development this or project share, complete in an integration or release environment

2.5 Goal

Goal represents a specific task

Iii. Common Commands

MVN archetype:create: Creating a Maven Project

MVN compile: Compiling source code

MVN test-compile: Compiling test code

MVN test: Running unit tests in the application

MVN site: Sites that generate project-related information

MVN clean: Clears the build results from the target directory

MVN package: Generate Jar files from project

MVN install: Installing the jar in the local Repository

MVN eclipse:eclipse: Generate Eclipse Project file

Mvn-dmaven.test.skip=true: Ignoring test document compilation

Iv.. pom file

Pom Detailed

Cond......

Resources

Official documents

Maven Life cycle

http://www.trinea.cn/android/maven/

http://cjch.iteye.com/blog/940855

http://www.yiibai.com/maven/

Http://www.cnblogs.com/xing901022/p/4170248.html

Http://www.cnblogs.com/JeffreySun/archive/2013/03/14/2960573.html

Maven Learning Record

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.