Difference between maven scope compile and provided for JAR packaging
来源:互联网 发布:巴黎地铁游客数据 编辑:程序博客网 时间:2024/06/10 01:30
- 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.
Compile means that you need the JAR for compiling and running the app. For a web application, as an example, the JAR will be placed in the WEB-INF/lib directory.
Provided means that you need the JAR for compiling, but at run time there is already a JAR provided by the environment so you don't need it packaged with your app. For a web app, this means that the JAR file will not be placed into the WEB-INF/lib directory.
For a web app, if the app server already provides the JAR (or its functionality), then use "provided" otherwise use "compile"
- Difference between maven scope compile and provided for JAR packaging
- maven dependency中scope=compile 和 provided区别
- maven dependency中scope=compile 和 provided区别
- maven dependency中scope=compile 和 provided区别
- maven dependency中scope=compile 和 provided区别
- The difference between (()) and ().
- difference between "<" and "<<"
- The Difference between write through and write back for cache
- one mail for difference between LOCAL_LDLIBS and LOCAL_SHARED_LIBRARIES of Android
- maven scope-provided 与 optional 区别
- Difference Between typedef and #define
- Difference between PCDATA and CDATA
- Difference between CComPtr and CComQIPtr
- Difference between RVCT and GCCE
- Difference between RVCT and GCCE
- difference between slist and list.
- difference between stack and heap
- Difference between replace and translate
- 手动迁移ADT 的ANT结构工程至Gradle
- ubuntu下minicom的使用
- Android中ImageView的scaleType属性详解
- OpenGL ES之GLSurfaceView学习二:非交互式的实例
- 搭建LNMP+memcached环境
- Difference between maven scope compile and provided for JAR packaging
- 使用Rman将Windows Oracle 11gR2 32位中数据库恢复至Windows Oracle 11gR2 64位 与 centos 6.5 Oracle 11gR2 32位
- 作业4.20
- tar打包时排除一些文件或者目录
- BZOJ 3812 主旋律 状压DP+容斥原理
- failed to create the java virtual machine
- Intent Action大全和各种广播动作描述
- Android中UI布局的优化和HierarchyViewer工具的是使用
- GET 和 POST两种调用方式