一、仓库
1、本地仓库和远程仓库
根据坐标首先在本地仓库查找,如果没有,再去远程仓库
远程仓库:私服、中央仓库、其他公共库
本地库的配置:在settings.xml中
<localRepository> dir </localRepository>
二、生命周期
1、生命周期:清理、初始化、编译、测试、打包、集成测试、验证、部署、生成站点
2、生命周期的每个过程都绑定了一个或多个插件
3、maven的生命周期
1)、clean
pre-clean clean post-clean
2)、default
validate initialize generate-sources process-sources generate-resources process-resources
compile process-class generate-test-sources process-test=sources test-compile
process-test-compile test prepare-package package pre-integration-test integration-test
post-integretion-test integration-test vertify install deploy
3)、site
pre-site site post-site site-deploy
三、插件
1、插件目标:每一个功能就是一个插件目标
2、插件绑定:生命周期与插件绑定在一起,生命周期的每个阶段需要插件目标的功能
3、自定义绑定插件
<build> <plugins> <plugin> .... </plugin> </plugins> </build>
4、在线的插件信息:http://maven.apache.org/plugins/
四、项目的聚合和继承
1、聚合
<modules> <module>module1</module> <module>module2</module> </modules>
packaging必须为:pom
2、继承
<parent> <groupId></groupId> <artifactId></artifactId> <version></version> <relativePath></relativePath> </parent>