Add a 'bill of materials' project for Maven users

Add 'spring-framework-bom' meta-project that contains the other projects
in a dependencyManagement section.

Issue: SPR-11138
This commit is contained in:
Phillip Webb 2013-11-27 15:32:04 -08:00 committed by Rob Winch
parent b20b7415d8
commit 22ece06b39
3 changed files with 38 additions and 0 deletions

View File

@ -787,6 +787,41 @@ project("spring-aspects") {
}
}
project("spring-framework-bom") {
description = "Spring Framework (Bill of Materials)"
configurations.archives.artifacts.clear()
artifacts {
// work around GRADLE-2406 by attaching text artifact
archives(file("spring-framework-bom.txt"))
}
install {
repositories.mavenInstaller {
pom.whenConfigured {
packaging = "pom"
withXml {
asNode().children().last() + {
delegate.dependencyManagement {
delegate.dependencies {
parent.subprojects.sort { "$it.name" }.each { p ->
if (p.hasProperty("merge") && p.merge.into == null && p != project) {
delegate.dependency {
delegate.groupId(p.group)
delegate.artifactId(p.name)
delegate.version(p.version)
}
}
}
}
}
}
}
}
}
}
}
configure(rootProject) {
description = "Spring Framework"

View File

@ -22,6 +22,7 @@ include "spring-web"
include "spring-webmvc"
include "spring-webmvc-portlet"
include "spring-webmvc-tiles3"
include "spring-framework-bom"
// Exposes gradle buildSrc for IDE support
include "buildSrc"

View File

@ -0,0 +1,2 @@
This meta-project is used to generate a bill-of-materials POM that contains the other
projects in a dependencyManagement section.