Skip to content

[BUG] Jar hell from org.bouncycastle:bcprov-jdk18on #1072

@dbwiddis

Description

@dbwiddis

What is the bug?

Build is failing on Jar Hell.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dependencies'.
> Could not resolve all dependencies for configuration ':testCompileClasspath'.
   > Conflict found for the following module:
       - org.bouncycastle:bcprov-jdk18on between versions 1.80 and 1.78

How can one reproduce the bug?

  • ./gradlew compileTestJava

What is the expected behavior?

No Jar Hell

Do you have any additional context?

Our build.gradle specifies version 1.8.0:

implementation 'org.bouncycastle:bcprov-jdk18on:1.80'

The OpenSearch Version Catalog specifies 1.7.8:
https://github.com/opensearch-project/OpenSearch/blob/0ffed5e8b743a075f5d66c4fe6e9b8371eacfa14/gradle/libs.versions.toml#L61

Quick fix:

  • Change the build.gradle line above to get the version from the version catalog (${versions.bouncycastle})

Better fix:

  • Audit all the dependencies to see if they are in the version catalog and update appropriately.
  • Check whether they are actually required on the main build or whether they can be testImplementation as this one appears to probably be

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions