janhoy opened a new pull request, #4199: URL: https://github.com/apache/solr/pull/4199
Ref https://lists.apache.org/thread/w0tqdcjyo0wlbf7xjtc0ll9tjhwor8n2 I asked Claude to analyze and fix. This was the result. ### Problem Maven consumers of `solr-api`, `solr-solrj`, and `solr-core` 10.x get invalid POM errors: ``` [ERROR] 'dependencies.dependency.version' for com.fasterxml.jackson.core:jackson-annotations:jar is missing. [WARNING] The POM for org.apache.solr:solr-core:jar:10.x.x is invalid, transitive dependencies (if any) will not be available ``` Jackson dependencies in `gradle/libs.versions.toml` have no pinned version — they rely on the Jackson BOM for version resolution at Gradle build time. Gradle's `maven-publish` plugin faithfully omits `<version>` from the generated POM for such entries, since from Gradle's perspective the BOM import in `<dependencyManagement>` should cover it. However, Maven's model validator rejects POMs where `<dependencies>` entries lack `<version>` elements, even when a BOM import is present — particularly `solr-core`, which has no Jackson BOM entry in its `<dependencyManagement>` at all (its internal platform entry is stripped during POM generation). ### Fix Extend the existing `pom.withXml` block in `gradle/maven/defaults-maven.gradle` to post-process generated POMs: after the internal platform removal, collect all Gradle-resolved artifact versions from `compileClasspath`/`runtimeClasspath`, then inject explicit `<version>` elements for any `<dependency>` entry that is missing one. This uses the actual BOM-resolved versions (e.g. `jackson-annotations:2.20`, `jackson-core:2.20.1`, `jackson-databind:2.20.1`) and applies centrally to all published modules without requiring version pinning in `libs.versions.toml` or changes to individual `build.gradle` files. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
