[Maven] maven introduction, maven Introduction

Source: Internet
Author: User

[Maven] maven introduction, maven Introduction

Maven 

Java Community standard project management tools. Maven is a cross-platform project management tool. As a successful open-source project organized by Apache, it mainly serves to build projects on the java platform and manage dependencies and project information.

Main features: automatic building, dependency management, and Project Information Management

  • Automatic Build

Foolproof, highly automated, one-step building

  • Dependency Management

Automatically download relevant jar packages for centralized dependency management

  • Project information management

Project information, developer information, developer information, and documentation are automatically generated

Why Maven?

Ant Maven
No agreed directory structure Have a clearly agreed directory structure
You must specify what ant will do, when to do it, and then compile and package it. You only need to define a pom. xml file and place the source code in the default directory. Maven automatically handles other tasks.
No integration dependency management Dependency management and warehouse management

 

Maven installation and configuration

  • Install

Maven is a java project. Make sure that JDK is installed.

  • Configuration

Environment variable:
JAVA_HOME = D: \ env \ jdk1.6

MAVEN_HOME = D: \ env \ apache-maven-3.0.5

PATH =; % MAVEN_HOME % \ bin; % JAVA_HOME % \ bin

Check whether maven is successfully installed:

Mvn-v (or version)

Initialize Configuration

Set MAVEN_OPTS Environment Variables

-Xms128m –Xmx512m

When maven is used, if a memory overflow is reported, if mvn site is used to consume a large amount of memory, modify the Default Configuration:
Maven installation directory \ bin \ mvn. bat-> at @ REM set MAVEN_OPTS = ...... Add later

set MAVEN_OPTS= -Xms128m -Xmx512m

 

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.