[ 
https://issues.apache.org/jira/browse/SOLR-18003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048775#comment-18048775
 ] 

Christos Malliaridis edited comment on SOLR-18003 at 1/2/26 8:09 PM:
---------------------------------------------------------------------

This issue may be more serious than expected. Without the platform module being 
published as a BOM module and only used internally, the dependency resolution 
outside our project seems to be broken. Dependencies without a version in the 
version catalog libs.version.toml (that includes the mentioned jackson 
dependencies and a few more) may not be resolvable at all. This affects any 
module intended for consumers that use such dependencies (for example llm 
module).

I tried to publish locally the solrj library for testing, and noticed that the 
platform module is required as well, which is currently not contained in a 
publication. After temporary fixing the platform module and publishing it, I 
get these warnings when running `publishToMavenLocal`:
{quote}Maven publication 'bom' pom metadata warnings (silence with 
'suppressPomMetadataWarningsFor(variant)'):
 - Variant apiElements:
 - contains dependencies that will produce a pom file that cannot be consumed 
by a Maven client.
 - constraint dev.langchain4j:langchain4j-hugging-face declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-annotations declared with a 
Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-mistral-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-databind declared with a Maven 
incompatible version notation
 - constraint dev.langchain4j:langchain4j-open-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-cbor declared 
with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-smile 
declared with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-cohere declared with a Maven 
incompatible version notation
 - Variant runtimeElements:
 - contains dependencies that will produce a pom file that cannot be consumed 
by a Maven client.
 - constraint dev.langchain4j:langchain4j-hugging-face declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-annotations declared with a 
Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-mistral-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-databind declared with a Maven 
incompatible version notation
 - constraint dev.langchain4j:langchain4j-open-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-cbor declared 
with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-smile 
declared with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-cohere declared with a Maven 
incompatible version notation
These issues indicate information that is lost in the published 'pom' metadata 
file, which may be an issue if the published library is consumed by an old 
Gradle version or Apache Maven.
The 'module' metadata file, which is used by Gradle 6+ is not affected.{quote}
I tried to include solrj from the latest state in a gradle project, and I still 
get a resolution error:
{quote}Configuration cache state could not be cached: field `classpath` of 
`org.gradle.process.internal.DefaultJavaExecSpec_Decorated` bean found in field 
`javaExecSpec` of task `:app:com.tblreservations.app.AppKt.main()` of type 
`org.gradle.api.tasks.JavaExec`: error writing value of type 
'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection'
> Could not resolve all files for configuration ':app:runtimeClasspath'.
> Could not find com.fasterxml.jackson.core:jackson-databind:.
Required by:
project :app > org.apache:platform:11.0.0-SNAPSHOT
project :app > org.apache.solr:solr-solrj:11.0.0-SNAPSHOT
> Could not find com.fasterxml.jackson.core:jackson-core:.
Required by:
project :app > org.apache:platform:11.0.0-SNAPSHOT
project :app > org.apache.solr:solr-solrj:11.0.0-SNAPSHOT

Possible solution:
 - Declare repository providing the artifact, see the documentation at 
[https://docs.gradle.org/current/userguide/declaring_repositories.html]{quote}
An alternative approach to fix these warnings and errors is to provide the 
versions for the libraries listed above, which kinda defeat the purpose of the 
BOMs though. By adding the BOM as a dependency like in the PR seems to be the 
quickest and easiest fix.

We have also considered in the past the publication of a BOM module too, but I 
don't remember the outcome of that discussion.


was (Author: JIRAUSER305622):
This issue may be more serious than expected. Without the platform module being 
published as a BOM module and only used internally, the dependency resolution 
outside our project seems to be broken. Dependencies without a version in the 
version catalog libs.version.toml (that includes the mentioned jackson 
dependencies and a few more) may not be resolvable at all. This affects any 
module intended for consumers that use such dependencies (for example llm 
module).

I tried to publish locally the solrj library for testing, and noticed that the 
platform module is required as well, which is currently not contained in a 
publication. After temporary fixing the platform module and publishing it, I 
get these warnings when running `publishToMavenLocal`:
{quote}
Maven publication 'bom' pom metadata warnings (silence with 
'suppressPomMetadataWarningsFor(variant)'):
 - Variant apiElements:
 - contains dependencies that will produce a pom file that cannot be consumed 
by a Maven client.
 - constraint dev.langchain4j:langchain4j-hugging-face declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-annotations declared with a 
Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-mistral-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-databind declared with a Maven 
incompatible version notation
 - constraint dev.langchain4j:langchain4j-open-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-cbor declared 
with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-smile 
declared with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-cohere declared with a Maven 
incompatible version notation
 - Variant runtimeElements:
 - contains dependencies that will produce a pom file that cannot be consumed 
by a Maven client.
 - constraint dev.langchain4j:langchain4j-hugging-face declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-annotations declared with a 
Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-mistral-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.core:jackson-databind declared with a Maven 
incompatible version notation
 - constraint dev.langchain4j:langchain4j-open-ai declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-cbor declared 
with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-core declared with a Maven 
incompatible version notation
 - constraint com.fasterxml.jackson.dataformat:jackson-dataformat-smile 
declared with a Maven incompatible version notation
 - constraint dev.langchain4j:langchain4j-cohere declared with a Maven 
incompatible version notation
These issues indicate information that is lost in the published 'pom' metadata 
file, which may be an issue if the published library is consumed by an old 
Gradle version or Apache Maven.
The 'module' metadata file, which is used by Gradle 6+ is not affected.
{quote}

I tried to include solrj from the latest state in a gradle project, and I still 
get a resolution error:

{quote}
Configuration cache state could not be cached: field `classpath` of 
`org.gradle.process.internal.DefaultJavaExecSpec_Decorated` bean found in field 
`javaExecSpec` of task `:app:com.tblreservations.app.AppKt.main()` of type 
`org.gradle.api.tasks.JavaExec`: error writing value of type 
'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection'
> Could not resolve all files for configuration ':app:runtimeClasspath'.
> Could not find com.fasterxml.jackson.core:jackson-databind:.
Required by:
project :app > org.apache:platform:11.0.0-SNAPSHOT
project :app > org.apache.solr:solr-solrj:11.0.0-SNAPSHOT
> Could not find com.fasterxml.jackson.core:jackson-core:.
Required by:
project :app > org.apache:platform:11.0.0-SNAPSHOT
project :app > org.apache.solr:solr-solrj:11.0.0-SNAPSHOT

Possible solution:
 - Declare repository providing the artifact, see the documentation at 
[https://docs.gradle.org/current/userguide/declaring_repositories.html]
{quote}

An alternative approach to fix these warnings and errors is to provide the 
versions for the libraries listed above, which kinda defeat the purpose of the 
BOMs though. But that would be the safest route I think for now. We have 
considered in the past the publication of a BOM module too, but I don't 
remember the outcome of that discussion.

> The POM for org.apache.solr:solr-solrj:jar:11.0.0-SNAPSHOT is invalid
> ---------------------------------------------------------------------
>
>                 Key: SOLR-18003
>                 URL: https://issues.apache.org/jira/browse/SOLR-18003
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 10.0, main(11.0)
>         Environment: * https://github.com/Tailormap/tailormap-api/pull/1522
>            Reporter: mark
>            Priority: Trivial
>              Labels: easyfix, pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> While preparing an upgrade of SolrJ from 9.10 to 10.x or later (forced by 
> upgrading to Spring Boot 4) I run into the following warning while building"
> {{[WARNING] The POM for 
> org.apache.solr:solr-solrj:jar:11.0.0-20251126.070616-55 is invalid, 
> transitive dependencies (if any) will not be available: 3 problems were 
> encountered while building the effective model for 
> org.apache.solr:solr-solrj:11.0.0-SNAPSHOT}}
> {{[ERROR] 'dependencies.dependency.version' for 
> com.fasterxml.jackson.core:jackson-databind:jar is missing. @ }}
> {{[ERROR] 'dependencies.dependency.version' for 
> com.fasterxml.jackson.core:jackson-annotations:jar is missing. @ }}
> {{[ERROR] 'dependencies.dependency.version' for 
> com.fasterxml.jackson.core:jackson-core:jar is missing. @ }}
> {*}Note{*}: this message appears for both 10.0.0-SNAPSHOT as well as 
> 11.0.0-SNAPSHOT (I don't see snapshots for 10.1.x but that may have the same 
> issue)
> The problem then shows up at runtime because transitive deoendecies are 
> missing resulting in ClassNotFoundExceptions, eg. 
> https://github.com/Tailormap/tailormap-api/actions/runs/19762262610/job/56627206060?pr=1522#step:7:2148
> I think the pom file for SolrJ should:
>  * import the Jackson BOM atrifact the same way as the solr-api does,
> or
>  * solr-solrj should have a parent that provides the Jackson version.
> I guess either should not be hard for someone that understands how the build 
> and publishing of the artifacts works.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to