# maven的pom标签学习()

maven的pom标签学习

根据源码自己分析的,由于知识有限,如有不对欢迎指出!

springboot的根目录pom

基本信息,常见的就是groupId和artifactId,version,packaging

基本信息,常见的就是groupId和artifactId,version,packaging

	<modelVersion>4.0.0</modelVersion>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-build</artifactId>
	<version>1.0.3.BUILD-SNAPSHOT</version>
	<packaging>pom</packaging>
	<name>Spring Boot Build</name>
	<description>Spring Boot Build</description>
	<url>http://projects.spring.io/spring-boot/</url>

所属组织

所属组织

<organization>
		<name>Pivotal Software, Inc.</name>
		<url>http://www.spring.io</url>
	</organization>

许可信息

许可信息

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>

软件配置管理,很神奇

软件配置管理,很神奇

	<scm>
		<url>https://github.com/spring-projects/spring-boot</url>
	</scm>

项目开发者信息

	<developers>
		<developer>
			<id>pwebb</id>
			<name>Phillip Webb</name>
			<email>pwebb at gopivotal.com</email>
			<organization>Pivotal Software, Inc.</organization>
			<organizationUrl>http://www.spring.io</organizationUrl>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
		<developer>
			<id>dsyer</id>
			<name>Dave Syer</name>
			<email>dsyer at gopivotal.com</email>
			<organization>Pivotal Software, Inc.</organization>
			<organizationUrl>http://www.spring.io</organizationUrl>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
	</developers>

描述了这个项目构建环境中的前提条件,最低3版本

<prerequisites> 
		<maven>3.0.0</maven>
	</prerequisites>

管理项目的版本,把别的地方的版本通过标签使用当前的

<properties>
		<main.basedir>${basedir}</main.basedir>
	</properties>

pluginManagement主要是为了统一管理插件,确保所有子POM使用的插件版本保持一致,类似dependencies和dependencyManagement。

maven-antrun-plugin< 可以在Maven执行时,额外执行Ant脚本

maven-antrun-plugin< 可以在Maven执行时,额外执行Ant脚本

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.7</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

profiles 这个是配置多环境的,看下面的一堆就像ant脚本了

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>spring-boot-dependencies</module>
				<module>spring-boot-parent</module>
				<module>spring-boot-tools</module>
				<module>spring-boot</module>
				<module>spring-boot-autoconfigure</module>
				<module>spring-boot-actuator</module>
				<module>spring-boot-starters</module>
				<module>spring-boot-cli</module>
			</modules>
		</profile>
		<profile>
			<id>integration</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>spring-boot-integration-tests</module>
			</modules>
		</profile>
		<profile>
			<id>prepare</id>
			<properties>
				<skipTests>true</skipTests>
			</properties>
			<modules>
				<module>spring-boot-tools</module>
			</modules>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<dependencies>
							<dependency>
								<groupId>ant-contrib</groupId>
								<artifactId>ant-contrib</artifactId>
								<version>1.0b3</version>
								<exclusions>
									<exclusion>
										<groupId>ant</groupId>
										<artifactId>ant</artifactId>
									</exclusion>
								</exclusions>
							</dependency>
							<dependency>
								<groupId>org.apache.ant</groupId>
								<artifactId>ant-nodeps</artifactId>
								<version>1.8.1</version>
							</dependency>
							<dependency>
								<groupId>org.tigris.antelope</groupId>
								<artifactId>antelopetasks</artifactId>
								<version>3.2.10</version>
							</dependency>
						</dependencies>
						<executions>
							<execution>
								<id>generate-settings.xml</id>
								<phase>verify</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<inherited>false</inherited>
								<configuration>
									<target>
										<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
										<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" />
										<var name="version-type" value="${project.version}" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp=".*\.(.*)" replace="\1" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
										<stringutil string="${version-type}" property="profile">
											<lowercase />
										</stringutil>
										<echo message="Writing settings for ${profile} profile" />
										<copy file=".settings-template.xml" tofile="settings.xml" overwrite="true">
											<filterset>
												<filter token="profile" value="${profile}" />
											</filterset>
										</copy>
									</target>
								</configuration>
							</execution>
							<execution>
								<id>fixup-starter-parent</id>
								<phase>verify</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<inherited>false</inherited>
								<configuration>
									<target>
										<property name="sourceFile" value="spring-boot-starters/spring-boot-starter-parent/pom.xml" />
										<xslt in="${sourceFile}" out="${sourceFile}.new" force="true">
											<style>
												<string><![CDATA[
<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
	exclude-result-prefixes="m">

	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*" />
		</xsl:copy>
	</xsl:template>

	<xsl:template
		match="m:properties/m:spring-boot.version/text()">
		<xsl:value-of select="/m:project/m:parent/m:version/text()"/>
	</xsl:template>

	<xsl:template
		match="m:dependency[m:groupId='org.springframework.boot']/m:version/text()">
		<xsl:text>${spring-boot.version}</xsl:text>
	</xsl:template>

	<xsl:template
		match="m:plugin[m:groupId='org.springframework.boot']/m:version/text()">
		<xsl:text>${spring-boot.version}</xsl:text>
	</xsl:template>

</xsl:stylesheet>
				]]>
												</string>
											</style>
										</xslt>
										<move file="${sourceFile}" tofile="${sourceFile}.old" />
										<move file="${sourceFile}.new" tofile="${sourceFile}" />
										<delete file="${sourceFile}.old" />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>full</id>
		</profile>
	</profiles>

spring-boot-dependencies

提出版本

提出版本

<properties>
		<activemq.version>5.7.0</activemq.version>
		<aspectj.version>1.7.4</aspectj.version>
		<codahale-metrics.version>3.0.2</codahale-metrics.version>
		<commons-dbcp.version>1.4</commons-dbcp.version>
		<commons-pool.version>1.6</commons-pool.version>
		<crashub.version>1.3.0-beta20</crashub.version>
		<gradle.version>1.6</gradle.version>
		<groovy.version>2.2.1</groovy.version>
		<h2.version>1.3.175</h2.version>
		<hamcrest.version>1.3</hamcrest.version>
		<hibernate.version>4.3.1.Final</hibernate.version>
		<hibernate-entitymanager.version>${hibernate.version}</hibernate-entitymanager.version>
		<hibernate-jpa-api.version>1.0.1.Final</hibernate-jpa-api.version>
		<hibernate-validator.version>5.0.3.Final</hibernate-validator.version>
		<httpclient.version>4.3.3</httpclient.version>
		<httpasyncclient.version>4.0.1</httpasyncclient.version>
		<hsqldb.version>2.3.2</hsqldb.version>
		<jackson.version>2.3.3</jackson.version>
		<javassist.version>3.18.1-GA</javassist.version> <!-- Same as Hibernate -->
		<jetty.version>8.1.14.v20131031</jetty.version>
		<joda-time.version>2.3</joda-time.version>
		<jolokia.version>1.2.0</jolokia.version>
		<jstl.version>1.2</jstl.version>
		<junit.version>4.11</junit.version>
		<lettuce.version>2.3.3</lettuce.version>
		<liquibase.version>3.1.1</liquibase.version>
		<log4j.version>1.2.17</log4j.version>
		<logback.version>1.1.2</logback.version>
		<mockito.version>1.9.5</mockito.version>
		<mongodb.version>2.11.4</mongodb.version>
		<mysql.version>5.1.30</mysql.version>
		<reactor.version>1.0.1.RELEASE</reactor.version>
		<servlet-api.version>3.0.1</servlet-api.version>
		<slf4j.version>1.7.7</slf4j.version>
		<snakeyaml.version>1.13</snakeyaml.version>
		<spock.version>0.7-groovy-2.0</spock.version>
		<spring.version>4.0.5.RELEASE</spring.version>
		<spring-integration.version>3.0.2.RELEASE</spring-integration.version>
		<spring-batch.version>2.2.6.RELEASE</spring-batch.version>
		<spring-data-jpa.version>1.5.2.RELEASE</spring-data-jpa.version>
		<spring-data-mongodb.version>1.4.2.RELEASE</spring-data-mongodb.version>
		<spring-data-redis.version>1.1.1.RELEASE</spring-data-redis.version>
		<spring-data-rest.version>2.0.2.RELEASE</spring-data-rest.version>
		<spring-hateoas.version>0.9.0.RELEASE</spring-hateoas.version>
		<spring-loaded.version>1.2.0.RELEASE</spring-loaded.version>
		<spring-rabbit.version>1.2.2.RELEASE</spring-rabbit.version>
		<spring-mobile.version>1.1.1.RELEASE</spring-mobile.version>
		<spring-security.version>3.2.4.RELEASE</spring-security.version>
		<thymeleaf.version>2.1.3.RELEASE</thymeleaf.version>
		<thymeleaf-extras-springsecurity3.version>2.1.1.RELEASE</thymeleaf-extras-springsecurity3.version>
		<thymeleaf-layout-dialect.version>1.2.4</thymeleaf-layout-dialect.version>
		<tomcat.version>7.0.54</tomcat.version>
	</properties>

dependencyManagement元素提供了一种管理依赖版本号的方式。在dependencyManagement元素中声明所依赖的jar包的版本号等信息,那么所有子项目再次引入此依赖jar包时则无需显式的列出版本号。Maven会沿着父子层级向上寻找拥有dependencyManagement 元素的项目,然后使用它指定的版本号。

dependencyManagement元素提供了一种管理依赖版本号的方式。在dependencyManagement元素中声明所依赖的jar包的版本号等信息,那么所有子项目再次引入此依赖jar包时则无需显式的列出版本号。Maven会沿着父子层级向上寻找拥有dependencyManagement 元素的项目,然后使用它指定的版本号。

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-graphite</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-ganglia</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-core</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-servlets</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-joda</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-dbcp</groupId>
				<artifactId>commons-dbcp</artifactId>
				<version>${commons-dbcp.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-pool</groupId>
				<artifactId>commons-pool</artifactId>
				<version>${commons-pool.version}</version>
			</dependency>
			<dependency>
				<groupId>com.lambdaworks</groupId>
				<artifactId>lettuce</artifactId>
				<version>${lettuce.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>${servlet-api.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>jstl</artifactId>
				<version>${jstl.version}</version>
			</dependency>
			<dependency>
				<groupId>joda-time</groupId>
				<artifactId>joda-time</artifactId>
				<version>${joda-time.version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>${log4j.version}</version>
			</dependency>
			<dependency>
				<groupId>mysql</groupId>
				<artifactId>mysql-connector-java</artifactId>
				<version>${mysql.version}</version>
			</dependency>
			<dependency>
				<groupId>nz.net.ultraq.thymeleaf</groupId>
				<artifactId>thymeleaf-layout-dialect</artifactId>
				<version>${thymeleaf-layout-dialect.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.activemq</groupId>
				<artifactId>activemq-core</artifactId>
				<version>${activemq.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.activemq</groupId>
				<artifactId>activemq-pool</artifactId>
				<version>${activemq.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>${httpclient.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpasyncclient</artifactId>
				<version>${httpasyncclient.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-core</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-el</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-logging-juli</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-jasper</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-websocket</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat</groupId>
				<artifactId>tomcat-jdbc</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat</groupId>
				<artifactId>tomcat-jsp-api</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjrt</artifactId>
				<version>${aspectj.version}</version>
			</dependency>
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjweaver</artifactId>
				<version>${aspectj.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy</artifactId>
				<version>${groovy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy-xml</artifactId>
				<version>${groovy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy-templates</artifactId>
				<version>${groovy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-webapp</artifactId>
				<version>${jetty.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>javax.servlet</artifactId>
						<groupId>org.eclipse.jetty.orbit</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-util</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-jsp</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-annotations</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${hamcrest.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-library</artifactId>
				<version>${hamcrest.version}</version>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>${h2.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-entitymanager</artifactId>
				<version>${hibernate-entitymanager.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate.javax.persistence</groupId>
				<artifactId>hibernate-jpa-2.0-api</artifactId>
				<version>${hibernate-jpa-api.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-validator</artifactId>
				<version>${hibernate-validator.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hsqldb</groupId>
				<artifactId>hsqldb</artifactId>
				<version>${hsqldb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.javassist</groupId>
				<artifactId>javassist</artifactId>
				<version>${javassist.version}</version>
			</dependency>
			<dependency>
				<groupId>org.liquibase</groupId>
				<artifactId>liquibase-core</artifactId>
				<version>${liquibase.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mongodb</groupId>
				<artifactId>mongo-java-driver</artifactId>
				<version>${mongodb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.projectreactor</groupId>
				<artifactId>reactor-core</artifactId>
				<version>${reactor.version}</version>
			</dependency>
			<dependency>
				<groupId>org.projectreactor</groupId>
				<artifactId>reactor-spring</artifactId>
				<version>${reactor.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>log4j-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jul-to-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-jdk14</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.spockframework</groupId>
				<artifactId>spock-core</artifactId>
				<version>${spock.version}</version>
				<exclusions>
					<exclusion>
						<groupId>org.codehaus.groovy</groupId>
						<artifactId>groovy-all</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-aop</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-aspects</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-beans</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-core</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context-support</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<groupId>quartz</groupId>
						<artifactId>quartz</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-expression</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jdbc</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jms</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-messaging</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-orm</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-oxm</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-lang</groupId>
						<artifactId>commons-lang</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-tx</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-websocket</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-web</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-webmvc</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>springloaded</artifactId>
				<version>${spring-loaded.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.batch</groupId>
				<artifactId>spring-batch-core</artifactId>
				<version>${spring-batch.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-jpa</artifactId>
				<version>${spring-data-jpa.version}</version>
				<exclusions>
					<exclusion>
						<groupId>org.springframework</groupId>
						<artifactId>spring-jdbc</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.springframework</groupId>
						<artifactId>spring-orm</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-mongodb</artifactId>
				<version>${spring-data-mongodb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-redis</artifactId>
				<version>${spring-data-redis.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.hateoas</groupId>
				<artifactId>spring-hateoas</artifactId>
				<version>${spring-hateoas.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-rest-webmvc</artifactId>
				<version>${spring-data-rest.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-core</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-file</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-http</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-ip</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-stream</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-core</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-config</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-web</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-acl</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.amqp</groupId>
				<artifactId>spring-rabbit</artifactId>
				<version>${spring-rabbit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.mobile</groupId>
				<artifactId>spring-mobile-device</artifactId>
				<version>${spring-mobile.version}</version>
			</dependency>
			<dependency>
				<groupId>org.thymeleaf</groupId>
				<artifactId>thymeleaf</artifactId>
				<version>${thymeleaf.version}</version>
			</dependency>
			<dependency>
				<groupId>org.thymeleaf</groupId>
				<artifactId>thymeleaf-spring4</artifactId>
				<version>${thymeleaf.version}</version>
			</dependency>
			<dependency>
				<groupId>org.thymeleaf.extras</groupId>
				<artifactId>thymeleaf-extras-springsecurity3</artifactId>
				<version>${thymeleaf-extras-springsecurity3.version}</version>
			</dependency>
			<dependency>
				<groupId>org.yaml</groupId>
				<artifactId>snakeyaml</artifactId>
				<version>${snakeyaml.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.geronimo.specs</groupId>
				<artifactId>geronimo-jms_1.1_spec</artifactId>
				<version>1.1.1</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.cli</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.connectors.ssh</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.connectors.telnet</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.embed.spring</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.plugins.cron</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.plugins.mail</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.shell</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.jolokia</groupId>
				<artifactId>jolokia-core</artifactId>
				<version>${jolokia.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

使用的插件也是一样的进行限制

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.7</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.8</version>
				</plugin>
				<plugin>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>2.9</version>
				</plugin>
				<plugin>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.16</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-help-plugin</artifactId>
					<version>2.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.3</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.16</version>
				</plugin>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>1.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.1</version>
				</plugin>
				<plugin>
					<groupId>pl.project13.maven</groupId>
					<artifactId>git-commit-id-plugin</artifactId>
					<version>2.1.7</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

spring-boot-parent

继承自spring-boot-dependencies

继承自spring-boot-dependencies

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-dependencies</artifactId>
		<version>1.0.3.BUILD-SNAPSHOT</version>
		<relativePath>../spring-boot-dependencies</relativePath>
	</parent>

管理版本,为啥java1.6?

<properties>
		<aether.version>0.9.1.v20140329</aether.version>
		<java.version>1.6</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.version>3.1.1</maven.version>
	</properties>

scm管理版本的

<scm>
		<url>http://github.com/spring-projects/spring-boot</url>
		<connection>scm:git:git://github.com/spring-projects/spring-boot.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-boot.git</developerConnection>
	</scm>

新加了一些版本限制,都是maven相关

	<dependencyManagement>
		<dependencies>
			<!-- Additional Dependencies the consumers of spring-boot-dependencies
				will generally not need -->
			<dependency>
				<groupId>jline</groupId>
				<artifactId>jline</artifactId>
				<version>2.11</version>
			</dependency>
			<dependency>
				<groupId>net.sf.jopt-simple</groupId>
				<artifactId>jopt-simple</artifactId>
				<version>4.6</version>
			</dependency>
			<dependency>
				<groupId>org.apache.ivy</groupId>
				<artifactId>ivy</artifactId>
				<version>2.3.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-aether-provider</artifactId>
				<version>3.2.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-archiver</artifactId>
				<version>2.5</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-artifact</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-core</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-model</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-settings</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-settings-builder</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-archiver</artifactId>
				<version>2.4.4</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-component-api</artifactId>
				<version>1.0-alpha-33</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-utils</artifactId>
				<version>3.0.17</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-api</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-connector-basic</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-impl</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-spi</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-transport-file</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-transport-http</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-util</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-core</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-base-services</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-base-services-groovy</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-plugins</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.zeroturnaround</groupId>
				<artifactId>zt-zip</artifactId>
				<version>1.7</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

dependencies,正常引入使用的jar包

	<dependencies>
		<!-- Generally Useful Test Dependencies -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

Maven存储库,看样子链接的中央存储库

	<repositories>
		<repository>
			<id>spring-ext</id>
			<url>http://repo.spring.io/ext-release-local/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
————————

maven的pom标签学习

根据源码自己分析的,由于知识有限,如有不对欢迎指出!

springboot的根目录pom

基本信息,常见的就是groupId和artifactId,version,packaging

基本信息,常见的就是groupId和artifactId,version,packaging

	<modelVersion>4.0.0</modelVersion>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-build</artifactId>
	<version>1.0.3.BUILD-SNAPSHOT</version>
	<packaging>pom</packaging>
	<name>Spring Boot Build</name>
	<description>Spring Boot Build</description>
	<url>http://projects.spring.io/spring-boot/</url>

所属组织

所属组织

<organization>
		<name>Pivotal Software, Inc.</name>
		<url>http://www.spring.io</url>
	</organization>

许可信息

许可信息

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>

软件配置管理,很神奇

软件配置管理,很神奇

	<scm>
		<url>https://github.com/spring-projects/spring-boot</url>
	</scm>

项目开发者信息

	<developers>
		<developer>
			<id>pwebb</id>
			<name>Phillip Webb</name>
			<email>pwebb at gopivotal.com</email>
			<organization>Pivotal Software, Inc.</organization>
			<organizationUrl>http://www.spring.io</organizationUrl>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
		<developer>
			<id>dsyer</id>
			<name>Dave Syer</name>
			<email>dsyer at gopivotal.com</email>
			<organization>Pivotal Software, Inc.</organization>
			<organizationUrl>http://www.spring.io</organizationUrl>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
	</developers>

描述了这个项目构建环境中的前提条件,最低3版本

<prerequisites> 
		<maven>3.0.0</maven>
	</prerequisites>

管理项目的版本,把别的地方的版本通过标签使用当前的

<properties>
		<main.basedir>${basedir}</main.basedir>
	</properties>

pluginManagement主要是为了统一管理插件,确保所有子POM使用的插件版本保持一致,类似dependencies和dependencyManagement。

maven-antrun-plugin< 可以在Maven执行时,额外执行Ant脚本

maven-antrun-plugin< 可以在Maven执行时,额外执行Ant脚本

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.7</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

profiles 这个是配置多环境的,看下面的一堆就像ant脚本了

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>spring-boot-dependencies</module>
				<module>spring-boot-parent</module>
				<module>spring-boot-tools</module>
				<module>spring-boot</module>
				<module>spring-boot-autoconfigure</module>
				<module>spring-boot-actuator</module>
				<module>spring-boot-starters</module>
				<module>spring-boot-cli</module>
			</modules>
		</profile>
		<profile>
			<id>integration</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>spring-boot-integration-tests</module>
			</modules>
		</profile>
		<profile>
			<id>prepare</id>
			<properties>
				<skipTests>true</skipTests>
			</properties>
			<modules>
				<module>spring-boot-tools</module>
			</modules>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<dependencies>
							<dependency>
								<groupId>ant-contrib</groupId>
								<artifactId>ant-contrib</artifactId>
								<version>1.0b3</version>
								<exclusions>
									<exclusion>
										<groupId>ant</groupId>
										<artifactId>ant</artifactId>
									</exclusion>
								</exclusions>
							</dependency>
							<dependency>
								<groupId>org.apache.ant</groupId>
								<artifactId>ant-nodeps</artifactId>
								<version>1.8.1</version>
							</dependency>
							<dependency>
								<groupId>org.tigris.antelope</groupId>
								<artifactId>antelopetasks</artifactId>
								<version>3.2.10</version>
							</dependency>
						</dependencies>
						<executions>
							<execution>
								<id>generate-settings.xml</id>
								<phase>verify</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<inherited>false</inherited>
								<configuration>
									<target>
										<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
										<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" />
										<var name="version-type" value="${project.version}" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp=".*\.(.*)" replace="\1" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
										<propertyregex property="version-type" override="true" input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
										<stringutil string="${version-type}" property="profile">
											<lowercase />
										</stringutil>
										<echo message="Writing settings for ${profile} profile" />
										<copy file=".settings-template.xml" tofile="settings.xml" overwrite="true">
											<filterset>
												<filter token="profile" value="${profile}" />
											</filterset>
										</copy>
									</target>
								</configuration>
							</execution>
							<execution>
								<id>fixup-starter-parent</id>
								<phase>verify</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<inherited>false</inherited>
								<configuration>
									<target>
										<property name="sourceFile" value="spring-boot-starters/spring-boot-starter-parent/pom.xml" />
										<xslt in="${sourceFile}" out="${sourceFile}.new" force="true">
											<style>
												<string><![CDATA[
<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
	exclude-result-prefixes="m">

	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*" />
		</xsl:copy>
	</xsl:template>

	<xsl:template
		match="m:properties/m:spring-boot.version/text()">
		<xsl:value-of select="/m:project/m:parent/m:version/text()"/>
	</xsl:template>

	<xsl:template
		match="m:dependency[m:groupId='org.springframework.boot']/m:version/text()">
		<xsl:text>${spring-boot.version}</xsl:text>
	</xsl:template>

	<xsl:template
		match="m:plugin[m:groupId='org.springframework.boot']/m:version/text()">
		<xsl:text>${spring-boot.version}</xsl:text>
	</xsl:template>

</xsl:stylesheet>
				]]>
												</string>
											</style>
										</xslt>
										<move file="${sourceFile}" tofile="${sourceFile}.old" />
										<move file="${sourceFile}.new" tofile="${sourceFile}" />
										<delete file="${sourceFile}.old" />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>full</id>
		</profile>
	</profiles>

spring-boot-dependencies

提出版本

提出版本

<properties>
		<activemq.version>5.7.0</activemq.version>
		<aspectj.version>1.7.4</aspectj.version>
		<codahale-metrics.version>3.0.2</codahale-metrics.version>
		<commons-dbcp.version>1.4</commons-dbcp.version>
		<commons-pool.version>1.6</commons-pool.version>
		<crashub.version>1.3.0-beta20</crashub.version>
		<gradle.version>1.6</gradle.version>
		<groovy.version>2.2.1</groovy.version>
		<h2.version>1.3.175</h2.version>
		<hamcrest.version>1.3</hamcrest.version>
		<hibernate.version>4.3.1.Final</hibernate.version>
		<hibernate-entitymanager.version>${hibernate.version}</hibernate-entitymanager.version>
		<hibernate-jpa-api.version>1.0.1.Final</hibernate-jpa-api.version>
		<hibernate-validator.version>5.0.3.Final</hibernate-validator.version>
		<httpclient.version>4.3.3</httpclient.version>
		<httpasyncclient.version>4.0.1</httpasyncclient.version>
		<hsqldb.version>2.3.2</hsqldb.version>
		<jackson.version>2.3.3</jackson.version>
		<javassist.version>3.18.1-GA</javassist.version> <!-- Same as Hibernate -->
		<jetty.version>8.1.14.v20131031</jetty.version>
		<joda-time.version>2.3</joda-time.version>
		<jolokia.version>1.2.0</jolokia.version>
		<jstl.version>1.2</jstl.version>
		<junit.version>4.11</junit.version>
		<lettuce.version>2.3.3</lettuce.version>
		<liquibase.version>3.1.1</liquibase.version>
		<log4j.version>1.2.17</log4j.version>
		<logback.version>1.1.2</logback.version>
		<mockito.version>1.9.5</mockito.version>
		<mongodb.version>2.11.4</mongodb.version>
		<mysql.version>5.1.30</mysql.version>
		<reactor.version>1.0.1.RELEASE</reactor.version>
		<servlet-api.version>3.0.1</servlet-api.version>
		<slf4j.version>1.7.7</slf4j.version>
		<snakeyaml.version>1.13</snakeyaml.version>
		<spock.version>0.7-groovy-2.0</spock.version>
		<spring.version>4.0.5.RELEASE</spring.version>
		<spring-integration.version>3.0.2.RELEASE</spring-integration.version>
		<spring-batch.version>2.2.6.RELEASE</spring-batch.version>
		<spring-data-jpa.version>1.5.2.RELEASE</spring-data-jpa.version>
		<spring-data-mongodb.version>1.4.2.RELEASE</spring-data-mongodb.version>
		<spring-data-redis.version>1.1.1.RELEASE</spring-data-redis.version>
		<spring-data-rest.version>2.0.2.RELEASE</spring-data-rest.version>
		<spring-hateoas.version>0.9.0.RELEASE</spring-hateoas.version>
		<spring-loaded.version>1.2.0.RELEASE</spring-loaded.version>
		<spring-rabbit.version>1.2.2.RELEASE</spring-rabbit.version>
		<spring-mobile.version>1.1.1.RELEASE</spring-mobile.version>
		<spring-security.version>3.2.4.RELEASE</spring-security.version>
		<thymeleaf.version>2.1.3.RELEASE</thymeleaf.version>
		<thymeleaf-extras-springsecurity3.version>2.1.1.RELEASE</thymeleaf-extras-springsecurity3.version>
		<thymeleaf-layout-dialect.version>1.2.4</thymeleaf-layout-dialect.version>
		<tomcat.version>7.0.54</tomcat.version>
	</properties>

dependencyManagement元素提供了一种管理依赖版本号的方式。在dependencyManagement元素中声明所依赖的jar包的版本号等信息,那么所有子项目再次引入此依赖jar包时则无需显式的列出版本号。Maven会沿着父子层级向上寻找拥有dependencyManagement 元素的项目,然后使用它指定的版本号。

dependencyManagement元素提供了一种管理依赖版本号的方式。在dependencyManagement元素中声明所依赖的jar包的版本号等信息,那么所有子项目再次引入此依赖jar包时则无需显式的列出版本号。Maven会沿着父子层级向上寻找拥有dependencyManagement 元素的项目,然后使用它指定的版本号。

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-graphite</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-ganglia</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-core</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.codahale.metrics</groupId>
				<artifactId>metrics-servlets</artifactId>
				<version>${codahale-metrics.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-joda</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-dbcp</groupId>
				<artifactId>commons-dbcp</artifactId>
				<version>${commons-dbcp.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-pool</groupId>
				<artifactId>commons-pool</artifactId>
				<version>${commons-pool.version}</version>
			</dependency>
			<dependency>
				<groupId>com.lambdaworks</groupId>
				<artifactId>lettuce</artifactId>
				<version>${lettuce.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>${servlet-api.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>jstl</artifactId>
				<version>${jstl.version}</version>
			</dependency>
			<dependency>
				<groupId>joda-time</groupId>
				<artifactId>joda-time</artifactId>
				<version>${joda-time.version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>${log4j.version}</version>
			</dependency>
			<dependency>
				<groupId>mysql</groupId>
				<artifactId>mysql-connector-java</artifactId>
				<version>${mysql.version}</version>
			</dependency>
			<dependency>
				<groupId>nz.net.ultraq.thymeleaf</groupId>
				<artifactId>thymeleaf-layout-dialect</artifactId>
				<version>${thymeleaf-layout-dialect.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.activemq</groupId>
				<artifactId>activemq-core</artifactId>
				<version>${activemq.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.activemq</groupId>
				<artifactId>activemq-pool</artifactId>
				<version>${activemq.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>${httpclient.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpasyncclient</artifactId>
				<version>${httpasyncclient.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-core</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-el</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-logging-juli</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-jasper</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.embed</groupId>
				<artifactId>tomcat-embed-websocket</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat</groupId>
				<artifactId>tomcat-jdbc</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat</groupId>
				<artifactId>tomcat-jsp-api</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjrt</artifactId>
				<version>${aspectj.version}</version>
			</dependency>
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjweaver</artifactId>
				<version>${aspectj.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy</artifactId>
				<version>${groovy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy-xml</artifactId>
				<version>${groovy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy-templates</artifactId>
				<version>${groovy.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-webapp</artifactId>
				<version>${jetty.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>javax.servlet</artifactId>
						<groupId>org.eclipse.jetty.orbit</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-util</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-jsp</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-annotations</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${hamcrest.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-library</artifactId>
				<version>${hamcrest.version}</version>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>${h2.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-entitymanager</artifactId>
				<version>${hibernate-entitymanager.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate.javax.persistence</groupId>
				<artifactId>hibernate-jpa-2.0-api</artifactId>
				<version>${hibernate-jpa-api.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-validator</artifactId>
				<version>${hibernate-validator.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hsqldb</groupId>
				<artifactId>hsqldb</artifactId>
				<version>${hsqldb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.javassist</groupId>
				<artifactId>javassist</artifactId>
				<version>${javassist.version}</version>
			</dependency>
			<dependency>
				<groupId>org.liquibase</groupId>
				<artifactId>liquibase-core</artifactId>
				<version>${liquibase.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mongodb</groupId>
				<artifactId>mongo-java-driver</artifactId>
				<version>${mongodb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.projectreactor</groupId>
				<artifactId>reactor-core</artifactId>
				<version>${reactor.version}</version>
			</dependency>
			<dependency>
				<groupId>org.projectreactor</groupId>
				<artifactId>reactor-spring</artifactId>
				<version>${reactor.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>log4j-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jul-to-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-jdk14</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.spockframework</groupId>
				<artifactId>spock-core</artifactId>
				<version>${spock.version}</version>
				<exclusions>
					<exclusion>
						<groupId>org.codehaus.groovy</groupId>
						<artifactId>groovy-all</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-aop</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-aspects</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-beans</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-core</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context-support</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<groupId>quartz</groupId>
						<artifactId>quartz</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-expression</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jdbc</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jms</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-messaging</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-orm</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-oxm</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-lang</groupId>
						<artifactId>commons-lang</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-tx</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-websocket</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-web</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-webmvc</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>springloaded</artifactId>
				<version>${spring-loaded.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.batch</groupId>
				<artifactId>spring-batch-core</artifactId>
				<version>${spring-batch.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-jpa</artifactId>
				<version>${spring-data-jpa.version}</version>
				<exclusions>
					<exclusion>
						<groupId>org.springframework</groupId>
						<artifactId>spring-jdbc</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.springframework</groupId>
						<artifactId>spring-orm</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-mongodb</artifactId>
				<version>${spring-data-mongodb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-redis</artifactId>
				<version>${spring-data-redis.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.hateoas</groupId>
				<artifactId>spring-hateoas</artifactId>
				<version>${spring-hateoas.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-rest-webmvc</artifactId>
				<version>${spring-data-rest.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-core</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-file</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-http</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-ip</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.integration</groupId>
				<artifactId>spring-integration-stream</artifactId>
				<version>${spring-integration.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-core</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-config</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-web</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-acl</artifactId>
				<version>${spring-security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.amqp</groupId>
				<artifactId>spring-rabbit</artifactId>
				<version>${spring-rabbit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.mobile</groupId>
				<artifactId>spring-mobile-device</artifactId>
				<version>${spring-mobile.version}</version>
			</dependency>
			<dependency>
				<groupId>org.thymeleaf</groupId>
				<artifactId>thymeleaf</artifactId>
				<version>${thymeleaf.version}</version>
			</dependency>
			<dependency>
				<groupId>org.thymeleaf</groupId>
				<artifactId>thymeleaf-spring4</artifactId>
				<version>${thymeleaf.version}</version>
			</dependency>
			<dependency>
				<groupId>org.thymeleaf.extras</groupId>
				<artifactId>thymeleaf-extras-springsecurity3</artifactId>
				<version>${thymeleaf-extras-springsecurity3.version}</version>
			</dependency>
			<dependency>
				<groupId>org.yaml</groupId>
				<artifactId>snakeyaml</artifactId>
				<version>${snakeyaml.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.geronimo.specs</groupId>
				<artifactId>geronimo-jms_1.1_spec</artifactId>
				<version>1.1.1</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.cli</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.connectors.ssh</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.connectors.telnet</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.embed.spring</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.plugins.cron</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.plugins.mail</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.crashub</groupId>
				<artifactId>crash.shell</artifactId>
				<version>${crashub.version}</version>
			</dependency>
			<dependency>
				<groupId>org.jolokia</groupId>
				<artifactId>jolokia-core</artifactId>
				<version>${jolokia.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

使用的插件也是一样的进行限制

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.7</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.8</version>
				</plugin>
				<plugin>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>2.9</version>
				</plugin>
				<plugin>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.16</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-help-plugin</artifactId>
					<version>2.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.3</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.16</version>
				</plugin>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>1.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.1</version>
				</plugin>
				<plugin>
					<groupId>pl.project13.maven</groupId>
					<artifactId>git-commit-id-plugin</artifactId>
					<version>2.1.7</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

spring-boot-parent

继承自spring-boot-dependencies

继承自spring-boot-dependencies

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-dependencies</artifactId>
		<version>1.0.3.BUILD-SNAPSHOT</version>
		<relativePath>../spring-boot-dependencies</relativePath>
	</parent>

管理版本,为啥java1.6?

<properties>
		<aether.version>0.9.1.v20140329</aether.version>
		<java.version>1.6</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.version>3.1.1</maven.version>
	</properties>

scm管理版本的

<scm>
		<url>http://github.com/spring-projects/spring-boot</url>
		<connection>scm:git:git://github.com/spring-projects/spring-boot.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-boot.git</developerConnection>
	</scm>

新加了一些版本限制,都是maven相关

	<dependencyManagement>
		<dependencies>
			<!-- Additional Dependencies the consumers of spring-boot-dependencies
				will generally not need -->
			<dependency>
				<groupId>jline</groupId>
				<artifactId>jline</artifactId>
				<version>2.11</version>
			</dependency>
			<dependency>
				<groupId>net.sf.jopt-simple</groupId>
				<artifactId>jopt-simple</artifactId>
				<version>4.6</version>
			</dependency>
			<dependency>
				<groupId>org.apache.ivy</groupId>
				<artifactId>ivy</artifactId>
				<version>2.3.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-aether-provider</artifactId>
				<version>3.2.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-archiver</artifactId>
				<version>2.5</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-artifact</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-core</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-model</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-settings</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-settings-builder</artifactId>
				<version>${maven.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-archiver</artifactId>
				<version>2.4.4</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-component-api</artifactId>
				<version>1.0-alpha-33</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-utils</artifactId>
				<version>3.0.17</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-api</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-connector-basic</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-impl</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-spi</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-transport-file</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-transport-http</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.aether</groupId>
				<artifactId>aether-util</artifactId>
				<version>${aether.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-core</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-base-services</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-base-services-groovy</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.gradle</groupId>
				<artifactId>gradle-plugins</artifactId>
				<version>${gradle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.zeroturnaround</groupId>
				<artifactId>zt-zip</artifactId>
				<version>1.7</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

dependencies,正常引入使用的jar包

	<dependencies>
		<!-- Generally Useful Test Dependencies -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

Maven存储库,看样子链接的中央存储库

	<repositories>
		<repository>
			<id>spring-ext</id>
			<url>http://repo.spring.io/ext-release-local/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>