一:Maven 命令
mvn:compile 编译SRC产生target中的class
mvn:test 编译test代码
mvn:clean 清空target
mvn:install 安装
mvn:package 打包
二:依赖传递特性
1,依赖层次一样依赖写在配置前面的
2,依赖层次不一样,依赖层次最少的
3,依赖传递
4,可使用exclusions排除依赖,精确控制依赖
三:聚合和继承
1,集合:
<modules>
<module>../user-core</module>
</modules>
2,聚合
<parent>
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<relativePath>../user-parent/pom.xml </relativePath>
</parent>
四:依赖的范围
1.test 范围是指测试范围有效,在编译和打包时都不会使用这个依赖。
2,compile 范围是指编译范围,在编译和打包的时候将依赖存储进去。
3,provided 范围是指在测试和编译有效,最后生成War包的时候不会加入。
4,rentime 在运行的时候依赖,在编译的时候不依赖。