<?xml version="1.0" encoding="UTF-8"?> <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/xsd/maven-4.0.0.xsd"> <!-- 指定了当前pom 的版本--> <modelVersion>4.0.0</modelVersion> <!-- 坐标的信息 --> <groupId>反写的公司网址 + 项目名</groupId> <artifactId>(模块的标识,实际项目中的模块)项目名 + 模块名</artifactId> <!-- 第一个 0 表示大版本好 第二个 0 表示分支版本号 第三个 0 表示小版本号 0.0.1 snapshot // 快照的版本 alpha 版 // 内测 beta 版 // 公测 Release // 稳定版 GA // 正式发布版 --> <version>当前项目的版本号:</version> <!-- maven 项目的打包方式 默认是jar war、zip、pom--> <packaging>jar</packaging> <!-- 项目的描述名 --> <name>SSOClient</name> <!-- 项目地址 --> <url></url> <!-- 项目描述 --> <description></description> <!-- 开发者信息 --> <developers></developers> <!-- 许可证信息 --> <licenses></licenses> <!-- 组织信息 --> <organization></organization> <!-- 依赖列表 --> <dependencies> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <type></type> <scope>test</scope> <!-- 设置依赖是否可选 --> <optional></optional> <!-- 排除依赖传递列表 --> <exclusions> <exclusion></exclusion> </exclusions> </dependency> </dependencies> <!-- 依赖的管理 --> <dependencyManagement> <!-- 依赖列表,但是并不会被运行,主要用于父模块中,用于子模块的继承 --> <dependencies> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <type></type> <!-- maven 中为我们提供了3种 classpath :编译,测试,运行 compile: 默认的范围,编译、测试、运行都有效 provided:编译、测试有效 (例如:servlet) runtime:测试、运行时有效 test:测试时有效(junit) system:编译、测试有效,不可移植性,与本机系统想关联 import:导入的范围,它只使用在dependencyManagement中,表示从其它的pom中继承过来的dependency配置 --> <scope>test</scope> <!-- 设置依赖是否可选 --> <optional></optional> <!-- 排除依赖传递列表 --> <exclusions> <exclusion></exclusion> </exclusions> </dependency> </dependencies> </dependencyManagement> <!-- 对构建的行为,提供相应的支持 --> <build> <!-- 插件的列表 --> <plugins> <plugin> <groupId></groupId> <artifactId>maven-compiler-plugin</artifactId> <version></version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> <!-- --> <parent></parent> <!-- 指定多个模块,可以一块儿进行编译--> <modules> <module></module> </modules> </project>