[Use] the concept and configuration of the maven of 1maven

maven build tool is a java based automation platform.
Build a development tool by make-> ant-> maven-> gradle
which gradle still under development, use less, learning more difficult, so now occupy the mainstream or maven.

 

the role of the maven:
①, to help us manage jar package:
i, increased third-party jar package.
To download a local warehouse, if not the local warehouse jar package, then networked to a central warehouse (mirror) to download. Mirroring the central warehouse is the central repository (server) shunt, or access to a global server sooner or later split.
ii, dependencies between the jar package management.
And the spring-context.jar such as the presence of other like spring-aop.jar dependent jar package, maven automatically introduced.
②, a project is split into several modules:
Considering a scene, along with our project bigger and bigger, the UI layer, Service layer, Dao layer number of files will be very much together, we Can the UI layer , service layer and so separate out as a project it? The answer is yes, maven can do, UI layer as a separate item to the front-end team leader, service layer and layer dao given to two back-end team leader, and finally integrated.

 

Download Maven:
Maven is Apache's products, go down just fine.


Configuration Maven:
path Path ①, arranged JAVA_HOME, jdk of

②, configure the path path MAVEN_HOME, maven's bin directory

③, verify: mvn -v

④, configure the local warehouse: settings.xml file in the conf directory under the maven directory, where you can see the default local repository is $ {user.name} / m2 / repository, we will change it.

Guess you like

Origin www.cnblogs.com/twz123/p/11517799.html