One,maven basic command
Two, coordinates, components and warehouses
1, coordinates and components
GroupId: Company URL anti-write + project name
Artifactid: Project name - module name
2, Warehouse
Local Warehouse
Remote Global central repository :
3, mirrored warehouse
Settings. xml <mirror> modifications
4. Change the local default warehouse path
Third, install the maven plugin in Eclipse
First step: Modify the Eclipse. ini
Step Two: Modify the JDK used
Part III: Modifying the use of local maven plugins
Test:
(1) Create a maven project
(2) build projects quickly and automatically
(3) Create a project package
Compile:
The same is true for packaging tests.
Four,maven life cycle and plugins
Project Build Process:
Life cycle:
Many of the commands in Mavan are integrated with each plug-in, and theApachemaven website provides many of the plugins that Maven needs for each lifecycle.
Examples of using plug-ins:
Using maven 's resource plugin, this plugin is a package that packages the project source into jars during package packaging .
Five,Pom. xml parsing
VI, Reliance
Range
Modify The default JRE for Eclipse
Dependency passing:a-b,b-c, then C will be added to the path of C when compiling a , you can use excusion to remove this indirect dependency.
Polymerization
Inherited
The Specific information of JUnit is inherited from the parent pom
Seven. construct a Web project using maven
Junit changed to 4.
Check the class file output path:
To convert a maven project into a web project:
To modify the configuration when a project is deployed:
Add jetty plugin:
Then maven build jetty: Run the Web project
Maven Introductory Learning