This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 07f111ed74f SOLR-17602 Exclude platform module from generated pom
(#4039)
07f111ed74f is described below
commit 07f111ed74f92e1f2b8222803b6c79a3f4994da4
Author: Jan Høydahl <[email protected]>
AuthorDate: Sun Jan 11 01:39:21 2026 +0100
SOLR-17602 Exclude platform module from generated pom (#4039)
---
gradle/maven/defaults-maven.gradle | 32 ++++++++++++++++++++++++++++++++
solr/modules/jwt-auth/build.gradle | 12 ++----------
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/gradle/maven/defaults-maven.gradle
b/gradle/maven/defaults-maven.gradle
index 7e4954a0498..fa47290feef 100644
--- a/gradle/maven/defaults-maven.gradle
+++ b/gradle/maven/defaults-maven.gradle
@@ -148,6 +148,38 @@ configure(subprojects.findAll { it.path in
rootProject.published }) { prj ->
artifact javadocJar
pom(configurePom)
+
+ // Remove the internal :platform dependency from
dependencyManagement in POMs
+ pom.withXml {
+ def root = asNode()
+ def depMgmt = root.dependencyManagement
+ if (depMgmt) {
+ depMgmt.each { dmNode ->
+ def deps = dmNode.dependencies
+ if (deps) {
+ deps.each { depsNode ->
+ // Collect dependencies to remove (can't modify while
iterating)
+ def toRemove = []
+ depsNode.dependency.each { dep ->
+ def groupId = dep.groupId?.text()
+ def artifactId = dep.artifactId?.text()
+ if (groupId == 'org.apache' && artifactId == 'platform')
{
+ toRemove.add(dep)
+ }
+ }
+ // Remove the collected dependencies
+ toRemove.each { dep ->
+ depsNode.remove(dep)
+ }
+ // Remove dependencyManagement section if it's now empty
+ if (depsNode.dependency.isEmpty()) {
+ root.remove(dmNode)
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
diff --git a/solr/modules/jwt-auth/build.gradle
b/solr/modules/jwt-auth/build.gradle
index 7cc4afb007e..7cf05aa2cef 100644
--- a/solr/modules/jwt-auth/build.gradle
+++ b/solr/modules/jwt-auth/build.gradle
@@ -19,17 +19,9 @@ apply plugin: 'java-library'
description = 'JWT / OpenID Connect / OAuth2 authentication plugin'
-// This is a hacky way to use permitTestUnusedDeclared with bom declared
dependencies.
-// See
https://github.com/gradle-dependency-analyze/gradle-dependency-analyze/issues/108
-configurations {
- constraintsOnly
- permitTestUnusedDeclared.extendsFrom constraintsOnly
- implementation.extendsFrom constraintsOnly
-}
-
dependencies {
- constraintsOnly platform(project(':platform'))
- constraintsOnly platform(libs.fasterxml.jackson.bom)
+ implementation platform(project(':platform'))
+ implementation platform(libs.fasterxml.jackson.bom)
implementation project(':solr:core')
implementation project(':solr:solrj')