MAVEN's installation configuration

Source: Internet
Author: User

This article is mainly for the Mac OS system under the installation of MAVEN tutorial.

1. First verify that there is a JDK. Java-version, no manual installation required

2.maven: http://maven.apache.org/download.cgi

3. Unzip the downloaded binary package into a directory,/usr/local/apache-maven-3.0.3

4. Configure the system environment variables:

In order for subsequent MAVEN version changes to not affect changes in our system environment variables, we first set up a soft connection for apache-maven-3.0.3

Ln-s apache-maven-3.0.3 maven

Configure MAVEN Home directory: Export m2_home=/usr/local/apache-maven-3.0.3

Configure the bin directory under your command-line path: Export Path=/usr/local/apache-maven-3.0.3/bin

Or add the above two configurations directly to the configuration file: ~/.bash_profile (~/.ZSHRC)

At the same time, you can also add the above two configuration M2_home,path to a script, so each time you log in to run this script/.bash_login

5. Verify the installation results mvn-v, after success, you can use MAVEN on the command line.

6.maven Installation Detail Description:

Maven itself is only 1.5M, and it downloads plugins and dependencies from remote repositories as needed. When you start using MAVEN, it will first download the plugin from the remote repository to the local repository.

To view the MAVEN itself file:

cd/usr/local/apache-maven-3.0.3

Ls-pl

LICENSE.txt:Apache maven Software license

Announcements and permissions required for NOTICE.txt:Maven-dependent class libraries

README.txt: Contains some of MAVEN's installation instructions

bin/: directory contains scripts to run Maven

The boot/directory contains a jar file that is responsible for creating the class loader required by Maven to run: Plexus-classworlds-2.4.jar

conf/contains a global settings.xml file that is used to customize some of the behavior of MAVEN on your local machine

The lib/directory contains the MAVEN core jar files

7. User-related configuration and local warehouse

When you're not just content with Maven and want to extend it, you'll notice that Maven has created some local user-related files and a local repository in your home directory. CD ~/.m2

Ls-pl

repository/: Your local maven repository. When you download dependencies from a remote maven repository, MAVEN stores a copy of this dependency in your local repository;

Or when you execute the command: Maven installs, the target is packaged and installed in the local repository.

Settings.xml: Contains the configuration of user-related certifications, warehouses, and other information, using the behavior to customize Maven.

MAVEN's installation configuration

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.