
Maven, translated as “expert” and “expert”, is an open source project developed by pure Java under Apache. Based on the concept of the Project object Model (abbreviation: POM), Maven uses a central piece of information to manage the construction, reporting, and documentation of a project.
Maven is a project management tool that can build and rely on Java projects.
Maven can also be used to build and manage a variety of projects, such as projects written in Clipper and other languages. Maven, once a sub-project of the Jakarta project, is now an independent Apache project hosted by the Apache Software Foundation. This tutorial is aimed at beginners to help them learn the basic functions of the Maven tool. After completing this tutorial, your Apache Maven expertise will reach an intermediate level, and then you can learn more advanced knowledge. To read this tutorial, you need to have the following foundations: Java 基础 . Maven can help developers do the following: Construction Document generation Report Dependence SCMs Publish Distribute Mailing list Maven advocates the use of a common standard directory structure, the principle that Maven uses conventions over configuration, and we follow this directory structure as much as possible. As follows: Catalogue Purpose ${basedir} 存放pom.xml和所有的子目录 ${basedir} / src/main/java Java source code for the project ${basedir} / src/main/resources 项目的资源,比如说property文件,springmvc.xml ${basedir} / src/test/java Test classes for the project, such as Junit code ${basedir} / src/test/resources Resources for testing ${basedir} / src/main/webapp/WEB-INF web应用文件目录,web项目的信息,比如存放web.xml、本地图片、jsp视图页面 ${basedir} / target Package output directory ${basedir} / target/classes Compile output directory ${basedir} / target/test-classes Test compilation output directory Test.java Maven will only automatically run test classes that conform to that naming convention ~/.m2/repository Maven default local warehouse directory location Project settings follow uniform rules. Share in any project. Dependency management includes automatic updates. A large and growing library. Extensible, you can easily write plug-ins for Java or scripting languages. New features can be accessed instantly with little or no additional configuration. 基于模型的构建 − Maven can build any number of projects into predefined output types, such as JAR,WAR or distribution based on project metadata, without the need to execute any script in most cases. 项目信息的一致性站点 − uses the same metadata as the build process, and Maven can generate a Web site or PDF, including any documents you want to add, to a standard report on the development status of the project. 发布管理和发布单独的输出 − Maven will not require additional configuration to integrate with source control systems such as Subversion or Git, and can manage project releases based on a tag. It can also publish it to a distribution location for use by other projects. Maven can publish separate output, such as JAR, with other dependencies and documentation archived, or as source code. 向后兼容性 − you can easily migrate multiple modules from older versions of Maven to Maven 3. When a child project uses a parent project dependency, normally the child project should inherit the parent project dependency without using the version number 并行构建 The speed of − compilation can generally be increased by 20-50%. 更好的错误报告 − Maven improves error reporting by providing you with a link to the Maven wiki page, where you can click to see a full description of the error. 11.1.1. What you need to know before reading this tutorial ¶
11.1.2. Maven function ¶
11.1.3. Agreed configuration ¶
11.1.4. Characteristics of Maven ¶