Implement simpler exclusion logic for Gradle

Simplify the exclusion logic used in Gradle by implementing implicit
exclusions rather than trying to detect transitive excludes.

This commit reverts much of the code originally included to fix gh-1047
which adds far too much complexity to the build and still doesn't solve
the underlying issue.

Fixes gh-1103
This commit is contained in:
Phillip Webb
2014-06-16 16:09:02 -07:00
parent f83c6aa7c1
commit 3a8a127285
21 changed files with 38 additions and 1882 deletions

View File

@@ -1,40 +0,0 @@
<?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>

View File

@@ -1,34 +0,0 @@
// 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')))