Browse Source

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
pull/439/head
Phillip Webb 11 years ago committed by Rob Winch
parent
commit
22ece06b39
  1. 35
      build.gradle
  2. 1
      settings.gradle
  3. 2
      spring-framework-bom/spring-framework-bom.txt

35
build.gradle

@ -787,6 +787,41 @@ project("spring-aspects") { @@ -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"

1
settings.gradle

@ -22,6 +22,7 @@ include "spring-web" @@ -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"

2
spring-framework-bom/spring-framework-bom.txt

@ -0,0 +1,2 @@ @@ -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…
Cancel
Save