Skip to content

Commit c639500

Browse files
committed
Fix removing dependencyManagement from POMs
There was always a dependencyManagement section due to the previous setup where dependencies.gradle applied dependency management to each project. Now that that is gone, some projects do not have a dependencyManagement section when the POMs are processed. The logic before only checked for null but the object was an empty collection in the case the dependencyManagement node wasn't found. This change correctly checks the dependencyManagement node(s) object is not null and not empty. See gh-1819 See gh-6080
1 parent b05ab35 commit c639500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ subprojects {
251251
// don't include resolved versions and have a parent POM including dependencyManagement.
252252
pom.withXml {
253253
def dependencyManagement = asNode().get('dependencyManagement')
254-
if (dependencyManagement != null) {
254+
if (dependencyManagement) {
255255
asNode().remove(dependencyManagement)
256256
}
257257
}

0 commit comments

Comments
 (0)