目录
Maven的使用(依赖管理)
依赖配置
当我将所有的依赖dependency注释掉时,没有依赖(dependencies)这个
当我取消注释时才会有依赖项(注意每次在pom里卖进行操作时一定要点击更新)
如果不知道依赖的坐标可以在这里面查找https://mvnrepository.com/
依赖传递
在projectA中有B且有C
可以使用<exclusions> </exclusions>来将依赖排除就不适用
<dependency>
<groupId>com.itheima</groupId>
<artifactId>maven-projectB</artifactId>
<version>1.0-SNAPSHOT</version>
<!--排除依赖-->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
依赖范围
生命周期
clean:清理
compile:编译
test:测试
package:打包
install:安装
生命周期里的功能都是由插件完成的