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/423/head
Phillip Webb 11 years ago
parent
commit
92e144a8a8
  1. 35
      build.gradle
  2. 1
      settings.gradle
  3. 2
      spring-framework-bom/spring-framework-bom.txt

35
build.gradle

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

@ -23,6 +23,7 @@ include "spring-webmvc" @@ -23,6 +23,7 @@ include "spring-webmvc"
include "spring-webmvc-portlet"
include "spring-webmvc-tiles3"
include "spring-websocket"
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