Maven installation and integration with Eclipse, maveneclipse Integration

Source: Internet
Author: User

Maven installation and integration with Eclipse, maveneclipse Integration
1. Install

Maven does not need to be installed on Windows as a service component. You only need to download, decompress, and configure environment variables.


1.1 JDK and JAVA_HOME

Before installing Maven, make sure that you have installed JDK correctly. Maven can run on JDK1.4 or a later version. Run echo % java_home % to check whether the environment variable JAVA_HOME points to the correct JDK directory. Then run java-version to check whether the jdk version is 1.4 or later.


1.2 download Maven

Download Maven3.X (for example, Maven3.2.3, which has been developed to Maven3.25) http://maven.apache.org/download.html. We only need to download the apache-maven-3.2.3-bin.zip file. If you are interested in maven's source code and want to build mavens, you can download apache-maven-3.2.3-src.zip.


1.3 decompress

After the download is complete, just decompress the apache-maven-3.2.3-bin.zip file. For example, put it in the "F: \ maven" directory, for example:


    


Configure two environment variables:

MAVEN_HOME: F :\maven \ apache-maven-3.2.3

Path (added here): % MAVEN_HOME % \ bin;


1.4 Verification

Open the command line and enter echo % maven_home % to check whether the configured maven_home directory is correct, for example:

    


Open the command line and enter mvn-version. If the following content is output, the Maven installation is successful:

    


2. Directory Introduction

As shown in the following figure:


  


-Bin:

This directory contains the scripts run by mvn. These scripts are used to configure Java commands, prepare classpath and related Java System attributes, and then execute Java commands. Mvn is a shell script based on the UNIX platform, and mvn. bat is a bat script based on the Windows platform. When you enter any mvn command in the command line, these scripts are actually called. The directory also contains two files: mvnDebug and mvnDebug. bat. Similarly, the former is the shell script of the UNIX platform, and the latter is the bat script of windows. So what are the differences and relationships between mvn and mvnDebug? Open the file and we can see that the two are basically the same, but mvnDebug has an additional MAVEN_DEBUG_OPTS configuration, which is used to enable debug when running Maven to debug Maven itself.


-Boot:

The directory contains only one file, taking maven 3.0 as an example, which is a plexus-classworlds-2.2.3.jar. Plexus-classworlds is a Class Loader framework. Compared with the default java class loader, it provides richer syntax for convenient configuration. Maven uses this framework to load its own class libraries.

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.