Maven Dependecy Scope
1. complie (default) , transitive
2. provided ,container,no transtive,in instance :
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<!--container provided no transmit -->
<scope>provided</scope>
</dependency>
3. runtime,userd in run and test
4. test, only used int test
5. system,in instance
<dependencies>
<dependency>
<groupId>javax.sql</groupId>
<artifactId>jdbc-stdext</artifactId>
<version>2.0</version>
<scope>system</scope>
<systemPath>${java.home}/lib/rt.jar</systemPath>
</dependency>
</dependencies>
6. import use other project pom,only used in dependencyManagement,in instance :used in springboot
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.3.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

浙公网安备 33010602011771号