testcontainers / testcontainers/testcontainers-java

Dependency conflict for jna (with testcontainers:1.15.0-rc2)

Open
#3,308 11 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

resolution/acknowledged
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Using the current testcontainers-core release candidate triggers the following dependency conflict:

./gradlew :dependencyInsight --configuration testCompileClasspath --dependency net.java.dev.jna:jna

> Task :dependencyInsight
Dependency resolution failed because of conflict(s) on the following module(s):
   - net.java.dev.jna:jna between versions 5.5.0 and 5.2.0

net.java.dev.jna:jna:5.5.0
   variant "compile" [
      org.gradle.status              = release (not requested)
      org.gradle.usage               = java-api
      org.gradle.libraryelements     = jar (compatible with: classes+resources)
      org.gradle.category            = library

      Requested attributes not found in the selected variant:
         org.gradle.dependency.bundling = external
         org.gradle.jvm.version         = 14
   ]
   Selection reasons:
      - By conflict resolution : between versions 5.5.0 and 5.2.0

net.java.dev.jna:jna:5.5.0
\--- com.github.docker-java:docker-java-transport-zerodep:3.2.5
     \--- org.testcontainers:testcontainers:1.15.0-rc2
          \--- org.testcontainers:spock:1.15.0-rc2
               \--- testCompileClasspath

net.java.dev.jna:jna:5.2.0 -> 5.5.0
\--- org.rnorth.visible-assertions:visible-assertions:2.1.2
     \--- org.testcontainers:testcontainers:1.15.0-rc2
          \--- org.testcontainers:spock:1.15.0-rc2
               \--- testCompileClasspath

I'm unsure whether the fix should be in docker-java-transport-zerodep to not expose jna or if jna should be excluded for visible-assertions. Maybe you have even better solutions. So this time no instant pull request, but I'm happy to create one for however and wherever you prefer the fix to be :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conflict with ./gradlew :dependencyInsight --configuration testCompileClasspath --dependency net.java.dev.jna:jna. Inspect the dependency metadata for docker-java-transport-zerodep and visible-assertions through the Testcontainers dependency graph, then verify that the chosen fix removes the JNA version conflict without breaking the test classpath.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.