Skip to content

Commit 6d4cba5

Browse files
artembilangaryrussell
authored andcommitted
Remove provided deps from the target POM
Related to spring-projects/spring-framework#23486 We have this `providedApi 'org.junit.platform:junit-platform-launcher'` where its `version` is resolved from `mavenBom "org.junit:junit-bom:$junitJupiterVersion"`. When we generate a Maven POM, this kind of dependency is present as an `optional` by default. We previously have overridden this to the `provided`, but it comes without a `version`. According to Spring Framework decision this kind of transitive dependencies are misleading. * Remove any `provided` deps in Gradle from the target POM altogether
1 parent 58b6889 commit 6d4cba5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

build.gradle

-6
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,6 @@ subprojects { subproject ->
234234
def pomDeps = asNode().dependencies.first()
235235
subproject.configurations.providedImplementation.allDependencies.each { dep ->
236236
pomDeps.remove(pomDeps.'*'.find { it.artifactId.text() == dep.name })
237-
pomDeps.appendNode('dependency').with {
238-
it.appendNode('groupId', dep.group)
239-
it.appendNode('artifactId', dep.name)
240-
it.appendNode('version', dep.version)
241-
it.appendNode('scope', 'provided')
242-
}
243237
}
244238
}
245239
}

0 commit comments

Comments
 (0)