File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,6 +148,38 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->
148148 artifact javadocJar
149149
150150 pom(configurePom)
151+
152+ // Remove the internal :platform dependency from dependencyManagement in POMs
153+ pom. withXml {
154+ def root = asNode()
155+ def depMgmt = root. dependencyManagement
156+ if (depMgmt) {
157+ depMgmt. each { dmNode ->
158+ def deps = dmNode. dependencies
159+ if (deps) {
160+ deps. each { depsNode ->
161+ // Collect dependencies to remove (can't modify while iterating)
162+ def toRemove = []
163+ depsNode. dependency. each { dep ->
164+ def groupId = dep. groupId?. text()
165+ def artifactId = dep. artifactId?. text()
166+ if (groupId == ' org.apache' && artifactId == ' platform' ) {
167+ toRemove. add(dep)
168+ }
169+ }
170+ // Remove the collected dependencies
171+ toRemove. each { dep ->
172+ depsNode. remove(dep)
173+ }
174+ // Remove dependencyManagement section if it's now empty
175+ if (depsNode. dependency. isEmpty()) {
176+ root. remove(dmNode)
177+ }
178+ }
179+ }
180+ }
181+ }
182+ }
151183 }
152184 }
153185 }
Original file line number Diff line number Diff line change @@ -19,17 +19,9 @@ apply plugin: 'java-library'
1919
2020description = ' JWT / OpenID Connect / OAuth2 authentication plugin'
2121
22- // This is a hacky way to use permitTestUnusedDeclared with bom declared dependencies.
23- // See https://github.com/gradle-dependency-analyze/gradle-dependency-analyze/issues/108
24- configurations {
25- constraintsOnly
26- permitTestUnusedDeclared. extendsFrom constraintsOnly
27- implementation. extendsFrom constraintsOnly
28- }
29-
3022dependencies {
31- constraintsOnly platform(project(' :platform' ))
32- constraintsOnly platform(libs. fasterxml. jackson. bom)
23+ implementation platform(project(' :platform' ))
24+ implementation platform(libs. fasterxml. jackson. bom)
3325
3426 implementation project(' :solr:core' )
3527 implementation project(' :solr:solrj' )
You can’t perform that action at this time.
0 commit comments