Skip to content

Commit

Permalink
Merge pull request #241 from grails/resolve-pom-dependencies
Browse files Browse the repository at this point in the history
Fix dependencies (resolve versions via global dependency management)
  • Loading branch information
puneetbehl authored Oct 24, 2023
2 parents b6e0659 + 9d43a43 commit 651ee65
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,14 @@ BINTRAY_KEY=key

}

// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// fix dependencies without a version
// resolve versions via global dependency management
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
final versions = project.dependencyManagement.dependencyManagementContainer.globalDependencyManagement.versions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
it.appendNode('version', versions["${it.groupId.text()}:${it.artifactId.text()}"])
}
}
}
Expand Down

0 comments on commit 651ee65

Please sign in to comment.