Merge branch 'gh-1047'

pull/1052/head
Phillip Webb 11 years ago
commit 639f0e12a6

@ -162,6 +162,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>1.1.0.BUILD-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -292,6 +298,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.1.0.BUILD-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@ -491,6 +503,12 @@
<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>
@ -501,6 +519,12 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>${httpasyncclient.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
@ -546,6 +570,12 @@
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>${velocity-tools.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
@ -666,6 +696,12 @@
<groupId>org.crashub</groupId>
<artifactId>crash.connectors.ssh</artifactId>
<version>${crashub.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.crashub</groupId>
@ -964,6 +1000,16 @@
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
<version>${spring-integration.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.mobile</groupId>

@ -1,5 +1,14 @@
import org.gradle.api.artifacts.result.UnresolvedDependencyResult;
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${project.bootVersion}")
}
}
repositories {
mavenLocal()
mavenCentral()
@ -13,6 +22,8 @@ dependencies {
springBootStarter "org.springframework.boot:${project.starter}:${project.bootVersion}"
}
apply plugin: 'spring-boot'
task checkCommonsLogging {
doFirst {
def commonsLogging = resolvedDependencies
@ -46,4 +57,4 @@ def getResolvedDependencies() {
throw new GradleException("Resolution of ${project.starter} failed: ${unresolved}")
}
resolved
}
}

@ -20,6 +20,7 @@
<main.basedir>${basedir}/..</main.basedir>
</properties>
<modules>
<!-- If you add a starter remember to also add a dependency in spring-boot-versions -->
<module>spring-boot-starter</module>
<module>spring-boot-starter-amqp</module>
<module>spring-boot-starter-aop</module>

@ -20,17 +20,15 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>

@ -18,9 +18,13 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -29,24 +33,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
</dependency>
</dependencies>
</project>

@ -19,16 +19,16 @@
</properties>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -37,14 +37,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
</dependencies>
</project>

@ -18,13 +18,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -33,24 +37,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-core</artifactId>
</dependency>
</dependencies>
</project>

@ -19,9 +19,13 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -30,24 +34,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -19,13 +19,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.gemstone.gemfire</groupId>
<artifactId>gemfire</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -35,33 +39,19 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-gemfire</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<repositories>

@ -19,22 +19,16 @@
</properties>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -44,43 +38,23 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
</dependencies>
</project>

@ -18,13 +18,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -33,24 +37,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -18,6 +18,14 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
@ -28,7 +36,7 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -37,24 +45,20 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-webmvc</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
</project>

@ -18,19 +18,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -39,24 +37,16 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-solr</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</dependency>
</dependencies>
</project>

@ -18,13 +18,21 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -33,14 +41,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
</dependencies>
</project>

@ -18,6 +18,10 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>

@ -21,6 +21,10 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -31,12 +35,6 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>

@ -19,18 +19,16 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -40,97 +38,39 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-messaging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-file</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-ip</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-stream</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -19,12 +19,12 @@
</properties>
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -34,23 +34,15 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
</dependencies>
</project>

@ -18,6 +18,10 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
@ -26,5 +30,15 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jsp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -21,16 +21,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -41,12 +39,6 @@
<dependency>
<groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -28,7 +28,6 @@
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<!-- Starters use SLF4J -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>

@ -18,19 +18,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -39,24 +37,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>redis.clients</groupId>

@ -19,16 +19,16 @@
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.crashub</groupId>
<artifactId>crash.cli</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.crashub</groupId>
<artifactId>crash.connectors.ssh</artifactId>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -36,14 +36,22 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.crashub</groupId>
<artifactId>crash.cli</artifactId>
</dependency>
<dependency>
<groupId>org.crashub</groupId>
<artifactId>crash.connectors.ssh</artifactId>
</dependency>
<dependency>
<groupId>org.crashub</groupId>
<artifactId>crash.connectors.telnet</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@ -52,6 +60,10 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
@ -59,10 +71,6 @@
<groupId>org.crashub</groupId>
<artifactId>crash.embed.spring</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>org.springframework</groupId>
@ -88,24 +96,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
</dependencies>
</project>

@ -19,38 +19,20 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -60,43 +42,23 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-expression</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
</dependencies>
</project>

@ -21,16 +21,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -41,42 +39,18 @@
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-config</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-social-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-social-facebook</artifactId>
</dependency>
</dependencies>
</project>

@ -21,16 +21,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -41,42 +39,18 @@
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-config</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-linkedin</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-social-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-social-linkedin</artifactId>
</dependency>
</dependencies>
</project>

@ -21,16 +21,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -41,42 +39,18 @@
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-config</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-twitter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-social-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<artifactId>spring-social-twitter</artifactId>
</dependency>
</dependencies>
</project>

@ -36,7 +36,7 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -44,5 +44,9 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
</dependencies>
</project>

@ -18,9 +18,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>

@ -18,6 +18,10 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
@ -30,5 +34,15 @@
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -18,6 +18,10 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
@ -37,16 +41,10 @@
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -55,14 +53,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
</dependencies>
</project>

@ -21,22 +21,10 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
@ -48,7 +36,7 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -56,15 +44,13 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

@ -18,9 +18,17 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -31,12 +39,6 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>

@ -21,16 +21,18 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@ -38,10 +40,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>

@ -31,7 +31,7 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-effective-pom</id>
<id>copy-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
@ -47,6 +47,15 @@
<outputDirectory>${generated.pom.dir}</outputDirectory>
<destFileName>effective-pom.xml</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-versions</artifactId>
<version>${project.version}</version>
<type>dependency-tree</type>
<overWrite>true</overWrite>
<outputDirectory>${generated.pom.dir}</outputDirectory>
<destFileName>dependency-tree.txt</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>

@ -0,0 +1,131 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.dependency.tools;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.springframework.boot.dependency.tools.Dependency.Exclusion;
import org.springframework.boot.dependency.tools.Dependency.ExclusionType;
/**
* {@link Dependencies} to extend an existing {@link Dependencies} instance with
* transitive {@link Exclusion}s located from a {@link DependencyTree}.
*
* @author Phillip Webb
* @since 1.1.0
*/
class DependenciesWithTransitiveExclusions extends AbstractDependencies {
public DependenciesWithTransitiveExclusions(Dependencies dependencies,
DependencyTree tree) {
DependencyBuilder builder = new DependencyBuilder(dependencies);
builder.addTransitiveExcludes(tree);
builder.finish();
}
/**
* Builder used to collect the transitive exclusions.
*/
private class DependencyBuilder {
private Map<ArtifactAndGroupId, DependencyAndTransitiveExclusions> dependencies;
public DependencyBuilder(Dependencies dependencies) {
this.dependencies = new LinkedHashMap<ArtifactAndGroupId, DependencyAndTransitiveExclusions>();
for (Dependency dependency : dependencies) {
this.dependencies.put(new ArtifactAndGroupId(dependency),
new DependencyAndTransitiveExclusions(dependency));
}
}
public void addTransitiveExcludes(DependencyTree tree) {
for (DependencyNode node : tree) {
DependencyAndTransitiveExclusions dependency = this.dependencies
.get(asArtifactAndGroupId(node));
if (dependency != null) {
for (DependencyNode child : node) {
addTransitiveExcludes(dependency, child);
}
}
}
}
private void addTransitiveExcludes(DependencyAndTransitiveExclusions dependency,
DependencyNode node) {
DependencyAndTransitiveExclusions exclusions = this.dependencies
.get(asArtifactAndGroupId(node));
if (exclusions != null) {
dependency.addTransitiveExclusions(exclusions.getSourceDependency());
}
for (DependencyNode child : node) {
addTransitiveExcludes(dependency, child);
}
}
private ArtifactAndGroupId asArtifactAndGroupId(DependencyNode node) {
return new ArtifactAndGroupId(node.getGroupId(), node.getArtifactId());
}
public void finish() {
for (Map.Entry<ArtifactAndGroupId, DependencyAndTransitiveExclusions> entry : this.dependencies
.entrySet()) {
add(entry.getKey(), entry.getValue().createNewDependency());
}
}
}
/**
* Holds a {@link Dependency} with additional transitive {@link Exclusion}s.
*/
private static class DependencyAndTransitiveExclusions {
private Dependency dependency;
private Set<Exclusion> transitiveExclusions = new LinkedHashSet<Exclusion>();
public DependencyAndTransitiveExclusions(Dependency dependency) {
this.dependency = dependency;
}
public Dependency getSourceDependency() {
return this.dependency;
}
public void addTransitiveExclusions(Dependency dependency) {
for (Exclusion exclusion : dependency.getExclusions()) {
this.transitiveExclusions.add(new Exclusion(exclusion.getGroupId(),
exclusion.getArtifactId(), ExclusionType.TRANSITIVE));
}
}
public Dependency createNewDependency() {
Set<Exclusion> exclusions = new LinkedHashSet<Dependency.Exclusion>();
exclusions.addAll(this.dependency.getExclusions());
exclusions.addAll(this.transitiveExclusions);
return new Dependency(this.dependency.getGroupId(),
this.dependency.getArtifactId(), this.dependency.getVersion(),
new ArrayList<Exclusion>(exclusions));
}
}
}

@ -137,11 +137,15 @@ public final class Dependency {
private final String artifactId;
Exclusion(String groupId, String artifactId) {
private final ExclusionType type;
Exclusion(String groupId, String artifactId, ExclusionType type) {
Assert.notNull(groupId, "GroupId must not be null");
Assert.notNull(groupId, "ArtifactId must not be null");
Assert.notNull(type, "Type must not be null");
this.groupId = groupId;
this.artifactId = artifactId;
this.type = type;
}
/**
@ -158,6 +162,10 @@ public final class Dependency {
return this.groupId;
}
public ExclusionType getType() {
return this.type;
}
@Override
public String toString() {
return this.groupId + ":" + this.artifactId;
@ -188,4 +196,22 @@ public final class Dependency {
}
public static enum ExclusionType {
/**
* An exclusion that was specified directly on the dependency.
*/
DIRECT,
/**
* An exclusion that is was specified on a dependency of this dependency. For
* example if {@literal commons-logging} is directly excluded from
* {@literal spring-core} then it is also transitive exclude on
* {@literal spring-context} (since {@literal spring-context} depends on
* {@literal spring-core}).
*/
TRANSITIVE
}
}

@ -0,0 +1,82 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.dependency.tools;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* A single node in a {@link DependencyTree}.
*
* @author Phillip Webb
* @see DependencyTree
* @since 1.1.0
*/
class DependencyNode implements Iterable<DependencyNode> {
private final String groupId;
private final String artifactId;
private final String version;
private List<DependencyNode> dependencies;
DependencyNode(String groupId, String artifactId, String version) {
this.groupId = groupId;
this.artifactId = artifactId;
this.version = version;
this.dependencies = new ArrayList<DependencyNode>();
}
@Override
public Iterator<DependencyNode> iterator() {
return getDependencies().iterator();
}
public String getGroupId() {
return this.groupId;
}
public String getArtifactId() {
return this.artifactId;
}
public String getVersion() {
return this.version;
}
public List<DependencyNode> getDependencies() {
return Collections.unmodifiableList(this.dependencies);
}
@Override
public String toString() {
return this.groupId + ":" + this.artifactId + ":" + this.version;
}
void addDependency(DependencyNode node) {
this.dependencies.add(node);
}
DependencyNode getLastDependency() {
return this.dependencies.get(this.dependencies.size() - 1);
}
}

@ -0,0 +1,159 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.dependency.tools;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Dependency tree information that can be loaded from the output of
* {@literal mvn dependency:tree}.
*
* @author Phillip Webb
* @since 1.1.0
* @see DependencyNode
*/
class DependencyTree implements Iterable<DependencyNode> {
private final DependencyNode root;
/**
* Create a new {@link DependencyTree} instance for the given input stream.
* @param inputStream input stream containing content from
* {@literal mvn dependency:tree} (the stream will be closed).
*/
public DependencyTree(InputStream inputStream) {
try {
this.root = parse(inputStream);
}
catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
private DependencyNode parse(InputStream inputStream) throws IOException {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
Parser parser = new Parser();
String line;
while ((line = reader.readLine()) != null) {
parser.append(line);
}
return parser.getRoot();
}
finally {
inputStream.close();
}
}
@Override
public Iterator<DependencyNode> iterator() {
return getDependencies().iterator();
}
/**
* @return the root node for the tree.
*/
public DependencyNode getRoot() {
return this.root;
}
/**
* @return the dependencies of the root node.
*/
public List<DependencyNode> getDependencies() {
return this.root.getDependencies();
}
/**
* Return the node at the specified index.
* @param index the index (multiple indexes can be used to traverse the tree)
* @return the node at the specified index
*/
public DependencyNode get(int... index) {
DependencyNode rtn = this.root;
for (int i : index) {
rtn = rtn.getDependencies().get(i);
}
return rtn;
}
private static class Parser {
private static final int INDENT = 3;
private static final Set<Character> PREFIX_CHARS = new HashSet<Character>(
Arrays.asList(' ', '+', '-', '\\', '|'));
private static final Pattern LINE_PATTERN = Pattern
.compile("[(]?([^:]*):([^:]*):([^:]*):([^:\\s]*)");
private Deque<DependencyNode> stack = new ArrayDeque<DependencyNode>();
public void append(String line) {
int depth = getDepth(line);
String data = line.substring(depth * INDENT);
if (depth == 0) {
this.stack.push(createNode(data));
}
else {
while (depth < this.stack.size()) {
this.stack.pop();
}
if (depth > this.stack.size()) {
this.stack.push(this.stack.peek().getLastDependency());
}
this.stack.peek().addDependency(createNode(data));
}
}
private int getDepth(String line) {
for (int i = 0; i < line.length(); i++) {
if (!Parser.PREFIX_CHARS.contains(line.charAt(i))) {
return i / INDENT;
}
}
return 0;
}
private DependencyNode createNode(String line) {
Matcher matcher = LINE_PATTERN.matcher(line);
if (!matcher.find()) {
throw new IllegalStateException("Unable to parese line " + line);
}
return new DependencyNode(matcher.group(1), matcher.group(2),
matcher.group(4));
}
public DependencyNode getRoot() {
return this.stack.getLast();
}
}
}

@ -57,7 +57,11 @@ class ManagedDependenciesDelegate extends AbstractDependencies {
private static Dependencies getSpringBootDependencies() {
if (springBootDependencies == null) {
springBootDependencies = new PomDependencies(getResource("effective-pom.xml"));
Dependencies dependencies = new PomDependencies(
getResource("effective-pom.xml"));
DependencyTree tree = new DependencyTree(getResource("dependency-tree.txt"));
dependencies = new DependenciesWithTransitiveExclusions(dependencies, tree);
springBootDependencies = dependencies;
}
return springBootDependencies;
}

@ -25,6 +25,7 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.springframework.boot.dependency.tools.Dependency.Exclusion;
import org.springframework.boot.dependency.tools.Dependency.ExclusionType;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@ -118,7 +119,7 @@ public class PomDependencies extends AbstractDependencies {
private Exclusion createExclusion(Element element) {
String groupId = getTextContent(element, "groupId");
String artifactId = getTextContent(element, "artifactId");
return new Exclusion(groupId, artifactId);
return new Exclusion(groupId, artifactId, ExclusionType.DIRECT);
}
private String getTextContent(Element element, String tagName) {

@ -0,0 +1,50 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.dependency.tools;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
/**
* Tests for {@link DependenciesWithTransitiveExclusions}.
*
* @author Phillip Webb
*/
public class DependenciesWithTransitiveExclusionsTests {
@Test
public void findsTransitiveExclusions() throws Exception {
Dependencies source = new PomDependencies(getClass().getResourceAsStream(
"test-effective-pom.xml"));
DependencyTree tree = new DependencyTree(getClass().getResourceAsStream(
"test-effective-pom-dependency-tree.txt"));
DependenciesWithTransitiveExclusions dependencies = new DependenciesWithTransitiveExclusions(
source, tree);
assertExcludes(dependencies, "sample01", "[org.exclude:exclude01]");
assertExcludes(source, "sample02", "[]");
assertExcludes(dependencies, "sample02", "[org.exclude:exclude01]");
}
private void assertExcludes(Dependencies dependencies, String artifactId,
String expected) {
Dependency dependency = dependencies.find("org.sample", artifactId);
assertThat(dependency.getExclusions().toString(), equalTo(expected));
}
}

@ -0,0 +1,44 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.dependency.tools;
import org.junit.Test;
import org.springframework.boot.dependency.tools.DependencyTree;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
/**
* Tests for {@link DependencyTree}.
*
* @author Phillip Webb
*/
public class DependencyTreeTests {
@Test
public void parse() throws Exception {
DependencyTree tree = new DependencyTree(getClass().getResourceAsStream(
"sample-dependency-tree.txt"));
assertThat(tree.getRoot().toString(), equalTo("org.springframework.boot:"
+ "spring-boot-versions-dependency-tree:1.1.0.BUILD-SNAPSHOT"));
assertThat(tree.getDependencies().size(), equalTo(204));
assertThat(tree.get(0, 1).toString(), equalTo("org.slf4j:slf4j-api:1.7.6"));
assertThat(tree.get(203).toString(), equalTo("org.springframework.security:"
+ "spring-security-web:3.2.4.RELEASE"));
}
}

@ -0,0 +1,5 @@
org.sample:sample:pom:1.0.0.BUILD-SNAPSHOT
+- org.sample:sample01:jar:1.0.0:compile
+- org.sample:sample02:jar:1.0.0:compile
| +- (org.sample:sample01:jar:1.0.0:compile - omitted for duplicate)
\- org.springframework.boot:spring-boot:jar:1.0.0.BUILD-SNAPSHOT:compile

@ -2,6 +2,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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sample</groupId>
<artifactId>sample</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<properties>
<sample.version>1.0.0</sample.version>

@ -22,10 +22,13 @@ import org.gradle.api.plugins.ApplicationPlugin
import org.gradle.api.plugins.BasePlugin
import org.gradle.api.plugins.JavaPlugin
import org.springframework.boot.gradle.agent.AgentPluginFeatures
import org.springframework.boot.gradle.exclude.ExcludePluginFeatures
import org.springframework.boot.gradle.repackage.RepackagePluginFeatures
import org.springframework.boot.gradle.resolve.ResolvePluginFeatures
import org.springframework.boot.gradle.resolve.SpringBootResolutionStrategy
import org.springframework.boot.gradle.run.RunPluginFeatures
/**
* Gradle 'Spring Boot' {@link Plugin}.
*
@ -41,11 +44,13 @@ class SpringBootPlugin implements Plugin<Project> {
project.getPlugins().apply(ApplicationPlugin)
project.getExtensions().create("springBoot", SpringBootPluginExtension)
project.getConfigurations().create(VersionManagedDependencies.CONFIGURATION);
new AgentPluginFeatures().apply(project)
new ResolvePluginFeatures().apply(project)
new RepackagePluginFeatures().apply(project)
new RunPluginFeatures().apply(project)
new ExcludePluginFeatures().apply(project)
useUtf8Encoding(project)
}

@ -108,4 +108,9 @@ public class SpringBootPluginExtension {
* Flag to indicate that the agent requires -noverify (and the plugin will refuse to start if it is not set)
*/
Boolean noverify;
/**
* If exclude rules should be applied to dependencies based on the spring-dependencies-bom
*/
boolean applyExcludeRules = true;
}

@ -0,0 +1,86 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.gradle;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.springframework.boot.dependency.tools.Dependencies;
import org.springframework.boot.dependency.tools.ManagedDependencies;
import org.springframework.boot.dependency.tools.PropertiesFileDependencies;
/**
* Utility to provide access to {@link ManagedDependencies} with support for version
* file overrides.
*
* @author Phillip Webb
*/
public class VersionManagedDependencies {
public static final String CONFIGURATION = "versionManagement";
private Configuration versionManagementConfiguration;
private Collection<Dependencies> versionManagedDependencies;
private ManagedDependencies managedDependencies;
public VersionManagedDependencies(Project project) {
this.versionManagementConfiguration = project.getConfigurations().getByName(
CONFIGURATION);
}
public ManagedDependencies getManagedDependencies() {
if (this.managedDependencies == null) {
this.managedDependencies = ManagedDependencies
.get(getVersionManagedDependencies());
}
return this.managedDependencies;
}
private Collection<Dependencies> getVersionManagedDependencies() {
if (versionManagedDependencies == null) {
Set<File> files = versionManagementConfiguration.resolve();
List<Dependencies> dependencies = new ArrayList<Dependencies>(files.size());
for (File file : files) {
dependencies.add(getPropertiesFileManagedDependencies(file));
}
this.versionManagedDependencies = dependencies;
}
return versionManagedDependencies;
}
private Dependencies getPropertiesFileManagedDependencies(File file) {
if (!file.getName().toLowerCase().endsWith(".properties")) {
throw new IllegalStateException(file + " is not a version property file");
}
try {
return new PropertiesFileDependencies(new FileInputStream(file));
}
catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
}

@ -0,0 +1,89 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.gradle.exclude;
import org.gradle.api.Action;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.artifacts.ModuleDependency;
import org.gradle.api.internal.artifacts.DefaultExcludeRule;
import org.gradle.api.logging.Logger;
import org.springframework.boot.dependency.tools.Dependency.Exclusion;
import org.springframework.boot.dependency.tools.ManagedDependencies;
import org.springframework.boot.gradle.VersionManagedDependencies;
/**
* {@link Action} to apply exclude rules.
*
* @author Phillip Webb
*/
public class ApplyExcludeRules implements Action<Configuration> {
private final Logger logger;
private final VersionManagedDependencies versionManagedDependencies;
public ApplyExcludeRules(Project project) {
this.logger = project.getLogger();
this.versionManagedDependencies = new VersionManagedDependencies(project);
}
@Override
public void execute(Configuration configuration) {
configuration.getDependencies().all(new Action<Dependency>() {
@Override
public void execute(Dependency dependency) {
applyExcludeRules(dependency);
}
});
}
private void applyExcludeRules(Dependency dependency) {
if (dependency instanceof ModuleDependency) {
applyExcludeRules((ModuleDependency) dependency);
}
}
private void applyExcludeRules(ModuleDependency dependency) {
ManagedDependencies managedDependencies = versionManagedDependencies
.getManagedDependencies();
org.springframework.boot.dependency.tools.Dependency managedDependency = managedDependencies
.find(dependency.getGroup(), dependency.getName());
if (managedDependency != null) {
if (managedDependency.getExclusions().isEmpty()) {
logger.debug("No exclusions rules applied for managed dependency "
+ dependency);
}
for (Exclusion exclusion : managedDependency.getExclusions()) {
addExcludeRule(dependency, exclusion);
}
}
else {
logger.debug("No exclusions rules applied for non-managed dependency "
+ dependency);
}
}
private void addExcludeRule(ModuleDependency dependency, Exclusion exclusion) {
logger.info("Adding managed exclusion rule " + exclusion + " to " + dependency);
DefaultExcludeRule rule = new DefaultExcludeRule(exclusion.getGroupId(),
exclusion.getArtifactId());
dependency.getExcludeRules().add(rule);
}
}

@ -0,0 +1,39 @@
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.gradle.exclude;
import org.gradle.api.Project;
import org.springframework.boot.gradle.PluginFeatures;
import org.springframework.boot.gradle.SpringBootPluginExtension;
/**
* {@link PluginFeatures} to apply exclusion rules.
*
* @author Phillip Webb
*/
public class ExcludePluginFeatures implements PluginFeatures {
@Override
public void apply(Project project) {
SpringBootPluginExtension extension = project.getExtensions().getByType(
SpringBootPluginExtension.class);
if (extension.isApplyExcludeRules()) {
project.getConfigurations().all(new ApplyExcludeRules(project));
}
}
}

@ -30,8 +30,6 @@ public class ResolvePluginFeatures implements PluginFeatures {
@Override
public void apply(final Project project) {
project.getConfigurations().create(
SpringBootResolutionStrategy.VERSION_MANAGEMENT_CONFIGURATION);
project.getConfigurations().all(new Action<Configuration>() {
@Override
public void execute(Configuration configuration) {

@ -16,23 +16,14 @@
package org.springframework.boot.gradle.resolve;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import org.gradle.api.Action;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.DependencyResolveDetails;
import org.gradle.api.artifacts.ModuleVersionSelector;
import org.springframework.boot.dependency.tools.Dependencies;
import org.springframework.boot.dependency.tools.Dependency;
import org.springframework.boot.dependency.tools.ManagedDependencies;
import org.springframework.boot.dependency.tools.PropertiesFileDependencies;
import org.springframework.boot.gradle.VersionManagedDependencies;
/**
* A resolution strategy to resolve missing version numbers using the
@ -42,12 +33,11 @@ import org.springframework.boot.dependency.tools.PropertiesFileDependencies;
*/
public class SpringBootResolutionStrategy {
public static final String VERSION_MANAGEMENT_CONFIGURATION = "versionManagement";
private static final String SPRING_BOOT_GROUP = "org.springframework.boot";
public static void applyToConfiguration(final Project project, Configuration configuration) {
if (VERSION_MANAGEMENT_CONFIGURATION.equals(configuration.getName())) {
public static void applyToConfiguration(final Project project,
Configuration configuration) {
if (VersionManagedDependencies.CONFIGURATION.equals(configuration.getName())) {
return;
}
VersionResolver versionResolver = new VersionResolver(project);
@ -56,13 +46,10 @@ public class SpringBootResolutionStrategy {
private static class VersionResolver implements Action<DependencyResolveDetails> {
private Configuration versionManagementConfiguration;
private Collection<Dependencies> versionManagedDependencies;
private final VersionManagedDependencies versionManagedDependencies;
public VersionResolver(Project project) {
this.versionManagementConfiguration = project.getConfigurations().getByName(
VERSION_MANAGEMENT_CONFIGURATION);
this.versionManagedDependencies = new VersionManagedDependencies(project);
}
@Override
@ -74,41 +61,19 @@ public class SpringBootResolutionStrategy {
}
private void resolve(DependencyResolveDetails resolveDetails) {
ManagedDependencies dependencies = ManagedDependencies.get(
getVersionManagedDependencies());
ManagedDependencies dependencies = this.versionManagedDependencies
.getManagedDependencies();
ModuleVersionSelector target = resolveDetails.getTarget();
if (SPRING_BOOT_GROUP.equals(target.getGroup())) {
resolveDetails.useVersion(dependencies.getSpringBootVersion());
return;
}
Dependency dependency = dependencies.find(target.getGroup(), target.getName());
Dependency dependency = dependencies
.find(target.getGroup(), target.getName());
if (dependency != null) {
resolveDetails.useVersion(dependency.getVersion());
}
}
private Collection<Dependencies> getVersionManagedDependencies() {
if (versionManagedDependencies == null) {
Set<File> files = versionManagementConfiguration.resolve();
List<Dependencies> dependencies = new ArrayList<Dependencies>(
files.size());
for (File file : files) {
dependencies.add(getPropertiesFileManagedDependencies(file));
}
this.versionManagedDependencies = dependencies;
}
return versionManagedDependencies;
}
private Dependencies getPropertiesFileManagedDependencies(File file) {
if (!file.getName().toLowerCase().endsWith(".properties")) {
throw new IllegalStateException(file + " is not a version property file");
}
try {
return new PropertiesFileDependencies(new FileInputStream(file));
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
}
}

@ -28,6 +28,7 @@
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<executions>
<execution>
@ -42,6 +43,49 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>execute</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
<configuration>
<scripts>
<script>file:///${project.basedir}/src/main/groovy/generateDependencyTreePom.groovy</script>
</scripts>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<executions>
<execution>
<id>generate-dependency-tree</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<cloneProjectsTo>${project.build.directory}/invoker</cloneProjectsTo>
<settingsFile>src/dependency-tree/settings.xml</settingsFile>
<streamLogs>true</streamLogs>
<pom>${basedir}/src/dependency-tree/pom.xml</pom>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
@ -89,6 +133,10 @@
<file>${project.build.directory}/effective-pom/spring-boot-versions.xml</file>
<type>effective-pom</type>
</artifact>
<artifact>
<file>${project.build.directory}/dependency-tree/dependency-tree.txt </file>
<type>dependency-tree</type>
</artifact>
</artifacts>
</configuration>
</execution>
@ -96,4 +144,134 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-gemfire</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-solr</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-groovy-templates</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hornetq</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mobile</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-remote-shell</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-facebook</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-linkedin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-twitter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-velocity</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,40 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-versions</artifactId>
<version>@project.version@</version>
<relativePath>../../target/dependency-tree</relativePath>
</parent>
<artifactId>spring-boot-versions-dependency-tree</artifactId>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>write-dependencies-tree</id>
<phase>generate-resources</phase>
<goals>
<goal>tree</goal>
</goals>
<configuration>
<outputFile>@project.build.directory@/dependency-tree/dependency-tree.txt</outputFile>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-ext</id>
<url>http://repo.spring.io/ext-release-local/</url>
</repository>
</repositories>
</project>

@ -0,0 +1,34 @@
// Generate a POM from the effective-pom that can be used to build a complete dependency tree
import groovy.util.*
import groovy.xml.*
def effectivePom = new XmlSlurper().parse(
new File(project.build.directory, 'effective-pom/spring-boot-versions.xml'))
effectivePom.dependencyManagement.dependencies.dependency.findAll{ it.groupId != "org.springframework.boot" }.each {
effectivePom.dependencies.appendNode( it )
}
// effectivePom.appendNode(effectivePom.dependencyManagement.dependencies)
effectivePom.parent.replaceNode {}
effectivePom.dependencyManagement.replaceNode {}
effectivePom.build.replaceNode {}
effectivePom.properties.replaceNode {}
effectivePom.repositories.replaceNode {}
effectivePom.pluginRepositories.replaceNode {}
effectivePom.reporting.replaceNode {}
out = new StreamingMarkupBuilder()
String xmlResult = out.bind {
mkp.declareNamespace("": "http://maven.apache.org/POM/4.0.0")
mkp.yield effectivePom
}
def outputDir = new File(project.build.directory, 'dependency-tree');
outputDir.mkdirs();
XmlUtil.serialize(xmlResult, new FileWriter(new File(outputDir, 'pom.xml')))
Loading…
Cancel
Save