https://blog.csdn.net/ningbohezhijunbl/article/details/25818069

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.
这是在xml中的配置

<bean id="jade.dataSource.worldcup" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://10.3.20.118:3306/worldcup"></property>
<property name="username" value="worldcup"></property>
<property name="password" value="geed2014"></property>
</bean>

maven scope runtime的更多相关文章

  1. maven scope provided和runtime的例子

    maven常用的scope有compile,provided,runtime,test. complie是默认值,表示在build,test,runtime阶段的classpath下都有依赖关系.te ...

  2. maven scope和项目发布需要注意的地方

    Maven Scope的使用: http://www.cnblogs.com/wangyonghao/p/5976055.html servlet-api和jsp-api等jar包,一般由servle ...

  3. java maven scope compile,provide,system,test,runtime

    在一个maven项目中,如果存在编译需要而发布不需要的jar包,可以用scope标签,值设为provided.如下: <dependency>            <groupId ...

  4. Maven Scope

    Dependency Scope  在POM 4中,<dependency>中还引入了<scope>,它主要管理依赖的部署.目前<scope>可以使用5个值:  * ...

  5. MAVEN Scope使用

    在Maven的依赖管理中,经常会用到依赖的scope设置.这里整理下各种scope的使用场景和说明,以及在使用中的实践心得.Scope的使用场景和说明1.compile编译范围,默认scope,在工程 ...

  6. Maven Scope取值的含义

    详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt257 maven依赖关系中Scope的作用 Dependency Scope ...

  7. Maven Scope 依赖范围

    Maven依赖范围就是用来控制依赖与这三种classpath(编译classpath.测试classpath.运行classpath)的关系,Maven有以下几种依赖范围: ·compile:编译依赖 ...

  8. maven scope 范围讲解

    解决办法: <dependency>     <groupId>javax.servlet</groupId>     <artifactId>java ...

  9. maven scope使用和理解

    在Maven的依赖管理中,经常会用到依赖的scope设置.这里整理下各种scope的使用场景和说明,以及在使用中的实践心得. scope的使用场景和说明 1.compile 编译范围,默认scope, ...

随机推荐

  1. andorid人员文件上传服务器的搭建(tomcat中)

    1.将.war文件复制到tomcat服务器webapps下,启动服务器即可 2.访问工程路径http://localhost:8080/FileUpload/index.jsp即可测试上传 3.测试成 ...

  2. Codeforces 912E Prime Gift(预处理 + 双指针 + 二分答案)

    题目链接 Prime Gift 题意  给定一个素数集合,求第k小的数,满足这个数的所有质因子集合为给定的集合的子集. 保证答案不超过$10^{18}$ 考虑二分答案. 根据折半的思想,首先我们把这个 ...

  3. Android学习--持久化(二) SharedPreferences

    SharedPreferences SharedPreferences 也是通过一个简单的Demo来理解SharedPreferences我们该怎么用,说说自己站在一个iOS开发的角度来看这个Shar ...

  4. codevs——3111 CYD啃骨头(背包)

    裸的01背包  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 黄金 Gold 题解       题目描述 Description CYD吃饭时有N个骨头可以啃,但CYD要午睡了 ...

  5. Flexible and Economical UTF-8 Decoder

    http://bjoern.hoehrmann.de/utf-8/decoder/dfa/

  6. Linux内核网络栈源代码分析

    http://blog.csdn.net/column/details/linux-kernel-net.html

  7. 【spring boot】10.spring boot下的单元测试

    spring boot下的单元测试,思前想后还是需要单独用一章篇幅来看看. 然后在看了介绍和使用时候,我感觉并不想多去看了. 但是还是给后来人留下参考的路径: 官网说明:https://spring. ...

  8. implement-stack-using-queues(easy,但也有思考价值)

    https://leetcode.com/problems/implement-stack-using-queues/ 还有种方法,就是利用同一个队列,知道队列长度前提下,把内容从头到尾,再向尾部依次 ...

  9. linux使用tar命令打包压缩时排除某个文件夹或文件

    今天在使用tar命令进行文件夹打包压缩的时候,需要打包压缩masalaPage目录,但是该目录中的2017,2016两个目录中的文件不进行打包压缩 所以通常使用的tar -zcvf masalaPag ...

  10. String转Map的工具类

    借鉴代码 public class StringToMapUtil { public static Map<String, String> getValue(String param) { ...