15) maven dependency scope
Dependency Scope
Dependency scope is used to limit the transitivity of a dependency, and also to affect the classpath used for various build tasks.
There are 6 scopes available:
- compile
This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects. - provided
This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive. - runtime
This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath. - test
This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases. - system
This scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository. - import (only available in Maven 2.0.9 or later)
This scope is only used on a dependency of type pom in the <dependencyManagement> section. It indicates that the specified POM should be replaced with the dependencies in that POM's <dependencyManagement> section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity of a dependency.
15) maven dependency scope的更多相关文章
- Maven Dependency Scope用法
原帖地址:http://uule.iteye.com/blog/2087485 官方API描述 Dependency scope 是用来限制Dependency的作用范围的, 影响maven项目在各个 ...
- Maven Dependency Scope
官方API描述 Dependency scope 是用来限制Dependency的作用范围的, 影响maven项目在各个生命周期时导入的package的状态. 自从2.0.9后,新增了1种,现在有了 ...
- Maven的dependency scope属性
官方地址:https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependen ...
- Maven学习----Dependency scope
首先官网API 2.09版本之后,有6中scope. Dependency scope 用来限制依赖的作用范围,同时也作用于各种编译路径类路径,下面详细说明这六种路径: compile这是默认范围,C ...
- Dependency Scope
Dependency Scope <dependency>中还引入了<scope>,它主要管理依赖的部署.目前<scope>可以使用5个值: * compile,缺 ...
- Maven依赖Scope标签用法
在一个maven项目中,如果存在编译需要而发布不需要的jar包,可以用scope标签,值设为provided.如下: <dependency> <groupId ...
- maven中scope属性的
Dependency Scope 在POM 4中,<dependency>中还引入了<scope>,它主要管理依赖的部署.目前<scope>可以使用5个值: * c ...
- maven中scope
scope maven中scope的默认值是compilescope的分类1)compile 默认是compile.compile表示被依赖项目需要参与当前项目的编译,包括后续的测试,运行周期也参与其 ...
- Maven错误Failed to read artifact descriptor for xxx:jar 和 missing artifact maven dependency
可参考:http://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place http:// ...
随机推荐
- JAVA 模拟瞬间高并发
如何模拟一个并发?当时我的回答虽然也可以算是正确的,但自己感觉缺乏实际可以操作的细节,只有一个大概的描述. 当时我的回答是:“线程全部在同一节点wait,然后在某个节点notifyAll.” 面试官: ...
- How to Pronounce SAY, SAYS, and SAID
How to Pronounce SAY, SAYS, and SAID Share Tweet Share Tagged With: Comparison I’ve noticed many non ...
- HTTP Response Code 中文详解
引自:https://blog.csdn.net/lplj717/article/details/70053560 1xx - 信息提示这些状态代码表示临时的响应.客户端在收到常规响应之前,应 ...
- do you\have you\are you
如果想问对方动作方面的 就用do you 例如 你知道吗? do you konw 如果想问对方是不是什么 就用are you 例如 你是一名教师吗 are you a teacher ? 如果想问对 ...
- IPMS 元件实作
一.改用zg框架的jsp 1.引入表头和表尾jsp <%@ include file="../../jsp/menuHeader.jsp"%> <%@ inclu ...
- SpringCloud组件和概念介绍1
一:什么是微服务(Microservice) 微服务英文名称Microservice,Microservice架构模式就是将整个Web应用组织为一系列小的Web服务.这些小的Web服务可以独立地编译及 ...
- Java工具类_表结构自动生成对应的实体类、Mapper.xml文件、Dao类
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWrit ...
- 兼容IE7、IE8、IE9的input type="number"插件
IE11版本好像才兼容input type="number",但是现在Win7版本操作系统下,很多人的IE版本都是IE7/8/9,所以为了体验就自己写了一个小插件,支持设置最大值. ...
- .NET中的文件IO操作实例
1.写入文件代码: //1.1 生成文件名和设置文件物理路径 Random random = new Random(DateTime.Now.Millisecond); ); string Physi ...
- 关于jni调用报UnsatisfiedLinkError的可能
一.说明 最近在做一个项目,需要使用java去调本地动态连接库,之前做测试的时候直接用pojo进行测试,是能够正常调用的.后面项目需要将接口封装为REST api,所以在spring boot上面开发 ...