One, what is maven (definition)
MAVEN is a project management tool that contains:
A Project object model (Pom:project object models),
A set of standard sets,
A project life cycle (Project Lifecycle): (clean, compile, test, report, package, deploy),
A Dependency management system (Dependency Management systems),
And the logic used to run the plug-in (plugin) target (goal) defined in the life cycle phase (phase ).
Understand:
1. maven is based on the Project object Model (POM), a software project management tool that can manage project building, reporting, and documentation through a short description of the information ( configuration file ).
2. Maven Main Features:
Easy to publish project information
To share a jar package in multiple projects
3. Maven (translated as "expert", "insider") is a cross-platform project management tool. It mainly serves the project building based on the Java platform, and relies on management and project information management .
Second, MAVEN's two classic role 1. Dependency Management
In a traditional Web project, we have to copy the jar packages that the project relies on directly into the project, resulting in a large amount of storage capacity for the project. And each project needs to import the jar package, reducing the reusability of the code.
Projects created with Maven,
What is dependency management?
Dependency refers to the interdependence between jar packages.
For example, when we build a STRUTS2 development framework, only struts2-core-2.3.16.3.jar this jar package is not possible, Struts2-core-2.3.16.3.jar also relies on other jar packages.
Dependency management refers to using MAVEN to manage the jar packages used in the project, and Maven manages the "jar packages needed to automatically download the project and manage the dependencies between the jar packages" in a unified manner.
Two points:
(1) A project developed by MAVEN to improve code reusability.
(2) Dependency management: That is, the MAVEN project management process for the jar package.
2. One-click Construction
What is a build project?
"Cleanup Project" → "Compile project" → "Test Project" → "Generate test Report" → "Package Project" → "Deployment Project"
Each of the above steps is built on the project (varying degrees of build), and these six steps are the complete build process for a project.
What are the ways to build a project?
(1) built by local Tomcat
Build the project by putting the packaged items into the Tomcat WebApps directory and launching the Startup.bat file in the bin directory.
(2) built by Maven (note: MAVEN's one-click Build, using MAVEN's own integrated tomcat plugin instead of a locally installed Tomcat server)
Give me a chestnut:
A simple MAVEN project is as follows,
Open a command-line window, go to a specific MAVEN project (desktop), and execute the command,
Access the returned address,
Attention:
MAVEN's one-click Build, using MAVEN's own integrated tomcat plugin instead of a locally installed Tomcat server.
Project management Tools (I, Maven)