This is an automated email from the ASF dual-hosted git repository.

dsmiley 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 db8a6d3451a SOLR-18185: POMs: publish resolved version (#4256)
db8a6d3451a is described below

commit db8a6d3451abb97d47f4c24cdb88fd60f53e20c7
Author: David Smiley <[email protected]>
AuthorDate: Thu Apr 2 17:04:43 2026 -0400

    SOLR-18185: POMs: publish resolved version (#4256)
    
    Co-authored-by: Copilot <[email protected]>
---
 changelog/unreleased/SOLR-18185-pomPublishVersions.yml | 7 +++++++
 gradle/maven/defaults-maven.gradle                     | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/changelog/unreleased/SOLR-18185-pomPublishVersions.yml 
b/changelog/unreleased/SOLR-18185-pomPublishVersions.yml
new file mode 100644
index 00000000000..49e811c6dc0
--- /dev/null
+++ b/changelog/unreleased/SOLR-18185-pomPublishVersions.yml
@@ -0,0 +1,7 @@
+title: Published POMs now include resolved dependency versions, fixing 
ambiguous/missing version problems.
+type: fixed
+authors:
+  - name: David Smiley
+links:
+  - name: SOLR-18185
+    url: https://issues.apache.org/jira/browse/SOLR-18185
diff --git a/gradle/maven/defaults-maven.gradle 
b/gradle/maven/defaults-maven.gradle
index ea20f908ad1..418a60ea1d8 100644
--- a/gradle/maven/defaults-maven.gradle
+++ b/gradle/maven/defaults-maven.gradle
@@ -149,6 +149,12 @@ configure(subprojects.findAll {it.path in 
rootProject.published}) {prj ->
 
           pom(configurePom)
 
+          // Publish resolved/locked dependency versions instead of declared 
catalog versions
+          versionMapping {
+            usage('java-api') { fromResolutionOf('runtimeClasspath') }
+            usage('java-runtime') { fromResolutionResult() }
+          }
+
           // Remove the internal :platform dependency from 
dependencyManagement in POMs
           pom.withXml {
             def root = asNode()

Reply via email to