Maven Introduction and Installation

I. Introduction

  Maven is based on the Project Object Model (pom), to manage the project information can be constructed by a short description, software project management tool reports and documents. It contains a project object model (POM: Project Object Model), a set of standards, a project life cycle, a dependency management system and define the logic used to run the plug-in target life cycle stages.

ROLE

  1. Project process can be standardized, automated, efficient and powerful scalability;

  2. Using maven itself and its plug-ins can get the code inspection reports, unit test coverage, achieve sustained integration;

  3. The management of all the jar package, Import Plug-In automatically downloading dependencies have net case;

  4. hot deployment, hot compilation. When web project has been running, modify the code can be directly accepted by the web server without restarting the server or redeploy code can be packaged directly into maven war or jar project.

  The classic role: a key Maven dependency management, project construct.

III. Classic role

(1) Maven dependency management

  Maven's core feature is dependent on management. When we refer to the project (or subproject) multi-module, dependency management becomes a difficult task. However Maven demonstrated a high degree of control in this area.

  Figure can be drawn: Maven project not directly jar package into the project, but added coordinate the required jar package through the pom.xml file, so good to avoid direct bringing jar, the jar package in need when, just look pom.xml file, then the coordinates pom.xml file, to a special warehouse for storage jar package according to the coordinates to find the jar package, go run.

(2) a key project of building

  1) building: refers to items from the compile, test, run, packaging, installation and deployment maven whole process to be managed;

  2) a key building: refers to the entire building process, use a command maven can easily complete the entire work. Introduced after the command.

Four .Maven download and install

  1) Download: Baidu search Maven's official website    https://maven.apache.org/

    Click the Download download page:

   2) Installation: After downloading Maven, which was extracted to a path without Chinese space, for example: D: \ maven

   3) configure the environment variables: New system variables MAVEN_HOME, the variable value maven your installation path;

     This configuration is complete, verify, windows + R, type cmd to open a command window, enter mvn -v, appeared the following content on OK.

 

Guess you like

Origin www.cnblogs.com/wujialiang/p/12462369.html