Add dependencies bom

- Fixes #317
This commit is contained in:
Janne Valkealahti
2017-02-14 13:00:03 +00:00
parent 1a3f7da81c
commit 7d83b1432c
3 changed files with 47 additions and 0 deletions

View File

@@ -387,6 +387,50 @@ project('spring-statemachine-recipes-common') {
}
}
project('spring-statemachine-bom') {
description = "Spring Statemachine (Bill of Materials)"
dependencyManagement {
generatedPomCustomization {
enabled = false
}
}
configurations.archives.artifacts.clear()
artifacts {
// work around GRADLE-2406 by attaching text artifact
archives(file("spring-statemachine-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.name.contains('spring-statemachine-samples') &&
!p.name.contains('spring-statemachine-build-tests') &&
p != project) {
delegate.dependency {
delegate.groupId(p.group)
delegate.artifactId(p.name)
delegate.version(p.version)
}
}
}
}
}
}
}
}
}
}
}
configure(sampleProjects()) {
apply plugin: 'org.springframework.boot'
configurations.archives.artifacts.removeAll { it.archiveTask.is jar }

View File

@@ -10,6 +10,7 @@ include 'spring-statemachine-uml'
include 'spring-statemachine-build-tests'
include 'spring-statemachine-recipes'
include 'spring-statemachine-boot'
include 'spring-statemachine-bom'
include 'spring-statemachine-samples'
include 'spring-statemachine-samples:turnstile'

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.