Skip to content

Commit b1fed6f

Browse files
committed
Only apply dependency-management and propdeps-maven to subprojects
Previously, the dependency management and propdeps-maven plugins were being applied to all projects. The latter caused a problem with publishing to Artifactory as the buildSrc project now had the propdeps-maven plugin applied to it. This commit removes the logic that was applying the propdeps-plugin to all projects so that it's only applied to subprojects excluding the buildSrc project. The logic that applies the dependency management plugin has been moved to the same location. It is applied after the propdeps-maven plugin as, otherwise, the pom customization does not work correctly and optional dependencies are not included in generated poms. Issue: SPR-15167
1 parent 54e2d63 commit b1fed6f

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

build.gradle

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,8 @@ configure(allprojects) { project ->
103103
ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
104104

105105
apply plugin: "propdeps"
106-
apply plugin: "propdeps-maven"
107106
apply plugin: "java"
108107
apply plugin: "test-source-set-dependencies"
109-
apply plugin: "io.spring.dependency-management"
110108
apply from: "${gradleScriptDir}/ide.gradle"
111109

112110
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
@@ -178,16 +176,6 @@ configure(allprojects) { project ->
178176
maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
179177
}
180178

181-
dependencyManagement {
182-
imports {
183-
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
184-
}
185-
resolutionStrategy {
186-
cacheChangingModulesFor 0, 'seconds'
187-
}
188-
applyMavenExclusions = false
189-
}
190-
191179
dependencies {
192180
testCompile("junit:junit:${junitVersion}") {
193181
exclude group:'org.hamcrest', module:'hamcrest-core'
@@ -262,6 +250,17 @@ configure(allprojects) { project ->
262250
configure(subprojects - project(":spring-build-src")) { subproject ->
263251
apply plugin: "merge"
264252
apply from: "${gradleScriptDir}/publish-maven.gradle"
253+
apply plugin: "io.spring.dependency-management"
254+
255+
dependencyManagement {
256+
imports {
257+
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
258+
}
259+
resolutionStrategy {
260+
cacheChangingModulesFor 0, 'seconds'
261+
}
262+
applyMavenExclusions = false
263+
}
265264

266265
configurations {
267266
jacoco

0 commit comments

Comments
 (0)