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:
parent
b20b7415d8
commit
22ece06b39
35
build.gradle
35
build.gradle
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
Loading…
Reference in New Issue