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. hdu 2242 无向图/求用桥一分为二后使俩个bcc点权值和之差最小并输出 /缩点+2次新图dfs

    题意如标题所述, 先无向图缩点,统计出每个bcc权,建新图,然后一遍dfs生成树,标记出每个点(新图)以及其子孙的权值之和.这样之后就可以dfs2来枚举边(原图的桥),更新最小即可. 调试了半天!原来 ...

  2. 16Aspx.com-将15位身份证转换成18位

    //********************************************************************************* //将15位身份证转换成18位时 ...

  3. (0)git安装

    windows安装 https://blog.csdn.net/sishen47k/article/details/80211002

  4. 长安大学第四届“迎新杯”程序设计竞赛 F 打铁的箱子【数学/进制思维/折半枚举】

    题目描述 作为彩虹岛上最擅长打铁的人,

  5. TIOBE排行榜

    作者:码思客链接:https://zhuanlan.zhihu.com/p/37513668来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 1 JAVA 毫无疑问的业界 ...

  6. gtest 自动化测试 部署

    1.部署 a)编译框架 1.1下载gtest库1.6.0 并解压到文件夹 "/user/{user}/gtest.1.6.0" 下载地址:https://code.google.c ...

  7. Spring中使用集成MongoDB Client启动时报错:rc: 48

    一定是所在的服务器也装了MongoDB导致端口冲突,解决方法:kill掉全部MongoDB的进程. ps aux | grep mongod PID 参考: http://blog.csdn.net/ ...

  8. Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason:

    Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Connection t ...

  9. 使用 ODP.NET 访问 Oracle(.net如何访问Oracle)详解【转】

    http://www.cnblogs.com/qinpengming/archive/2013/06/08/3127346.html 1,什么是ODF .NE,?就是Oracle 为 .NET (OD ...

  10. GLSL逐顶点光照[转]

    转载:http://blog.csdn.net/hgl868/article/details/7872350 引言 在OpenGL中有三种类型的光:方向光(directional).点光(point) ...