<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MySpring</groupId>
<artifactId>MySpring</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>MySpring Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
<spring.version>3.2.9.RELEASE</spring.version>
<mybatis.version>3.1.1</mybatis.version>
<mybatisspring.version>1.1.1</mybatisspring.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2</version>
<scope>provided</scope> <!-- 表明依赖的范围 -->
<!--
1、compile:默认使用依赖,对编译、测试、运行三种classpath都有效;
2、test:只在测试时有效;
3、provided:运行时无效,在编译和测试有效;
4、runtime:如jdbc,只在测试和运行时有效
-->
</dependency>
</dependencies>
<build>
<finalName>MySpring</finalName>
</build>
</project>
Maven的POM文件scope
猜你喜欢
转载自blog.csdn.net/m0_37179470/article/details/81074472
今日推荐
周排行