Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-17048: Update solrj dep on 'api' module #2029

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

gerlowskija
Copy link
Contributor

@gerlowskija gerlowskija commented Oct 20, 2023

https://issues.apache.org/jira/browse/SOLR-17048

Description

Solr 9.4 introduced a new 'api' module consumed by various other parts of Solr. The solrj module declared an 'implementation' dependency on this new module which worked for Solr's own build, but isn't actually sufficient to have the dependency picked up transitively in client apps, leading to a variety of ClassDefNotFound's.

Solution

This commit updates SolrJ's declaration of its 'api' dependency to list it as an "api" type dependency. This should prevent any client-side ClassDefNotFound problems related to these jar contents.

(Users of 9.4 can workaround this problem by adding an explicit dependency on solr-api in their apps, as in:

<dependency>
    <groupId>org.apache.solr</groupId>
    <artifactId>solr-api</artifactId>
    <version>9.4.0</version>
</dependency>

)

Tests

Existing tests continue to pass.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.

Previously listed as an 'implementation' dependency, this was causing
ClassDefNotFoundExceptions in some client apps that ran afoul of it.

Switching to an 'api' dependency should fix this.
@gerlowskija
Copy link
Contributor Author

(FYI @risdenk - thanks for alerting me on SOLR-17048)

@gerlowskija gerlowskija merged commit 1bccdf9 into apache:main Oct 23, 2023
3 checks passed
@gerlowskija gerlowskija deleted the SOLR-17048-dep-fix branch October 23, 2023 01:24
gerlowskija added a commit that referenced this pull request Oct 23, 2023
Previously listed as an 'implementation' dependency, this was causing
ClassDefNotFoundExceptions in some client apps that ran afoul of it.

Switching to an 'api' dependency should fix this.
dsmiley pushed a commit that referenced this pull request Dec 21, 2023
Previously listed as an 'implementation' dependency, this was causing
ClassDefNotFoundExceptions in some client apps that ran afoul of it.

Switching to an 'api' dependency should fix this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants