Maven role and application

 

1 Introduction

Maven is a Java project management tool, in JavaEE, we can easily use the Maven project management team, and now we learn JavaEE framework, using Maven can manage the library, effective and easily available to other team personnel use.

2, the operation

1) first extract two compressed on the D drive folder java

 

 

 

 2) Right "Computer" and select "Properties", then click "Advanced System Settings", click on the "Environment Variables" to set environment variables, system variables need to configure the following:

New System Variable MAVEN_HOME variable value: D: \ java \ apache-maven-3.6.2, the value of the variable is your folder path

Edit System Variable Path add the variable value:;% MAVEN_HOME% \ bin

 

 

 

 

 

3) Finally, test configuration was successful: a win key + R, to open the command prompt window, i.e. Dos interface, enter the following case mvn --version configuration was successful

 

 

 3, the eclipse arranged maven

1) Change the file setting.xml 

Line 53 write into the path

 

2) window-performance-- search maven - installation-- novice did not choose add maven

3) to add your address to let eclipse maven file can be found

 

4) user Setting --- you turn over a copy of the file path of setting.xml

 

5) window - show view - other-- search maven --- choose maven repositories

3, using

1) Create a new maven project

 

2) project structure

 

3) Right-click the item selected properties - project facets-- selected file versions

 

java build path --- choose a default --finish

 

Update Project

 

 4) establish web.xml file

 

 

 5) Set pom.xml file

Range servlet and jsp is provided

The fourth run election

 

 Every time runs out to empty the data table

6) Add a jar maven no sign in the following URL

 https://mvnrepository.com/

Guess you like

Origin www.cnblogs.com/wangxue1314/p/11884239.html