<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.7.6</version>
<scope>provided</scope>
</dependency>
groupId
用来唯一标识一个项目,通常是java的包名
artifactId
项目组产生的工件的唯一ID.
标识同一groupId下的子项目
version
artifactId的版本
scope
默认是compile
The scope of the dependency - compile, runtime, test, system, and provided. Used to calculate the various classpaths used for compilation, testing, and so on. It also assists in determining which artifacts to include in a distribution of this project.
type
默认是jar,就是导入的是jar包,但是其实还是可以有其他格式,比如war,pom等等

博客介绍了Maven依赖的关键属性。groupId用于唯一标识项目,通常是包名;artifactId是项目组工件的唯一ID,可标识子项目;version表示版本;scope用于计算编译、测试等类路径,辅助确定项目分发包含的工件;type默认是jar包,也有其他格式。
980

被折叠的 条评论
为什么被折叠?



