testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
7.96k stars 1.64k forks source link

Java 9: Project can't be compiled if it has module-info #1524

Open remal opened 5 years ago

remal commented 5 years ago

I have a JPMS project with module-info.java file. And I have split package issue when I'm trying to compile the project.

Java 8 public support ends in 2020. It's pretty soon. IMHO it makes sense to start developing Testcontainers using newer version of Java and targeting Java 8 bytecode.

kiview commented 5 years ago

As far as I understand it, we would solve this issue once we solve #1523, correct?

remal commented 5 years ago

@kiview , unfortunately no. It requires some refactoring that will break backward compatibility. JPMS requires modules not to share same packages. In other words if a module has classes within package a.b.c no other module can have classes within the package. But other module can have classes within subpackages like a.b.c.d.

remal commented 5 years ago

@rnorth Can we have this issue fixed in 2.0?

BTW I can help by submitting a PR, but there should be some maintainers' decision, as the PR will break backward compatibility.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

remal commented 4 years ago

The issue is still actual

m-rossini commented 4 years ago

Is there any decisions/updates on this issue?

unitydynamics commented 8 months ago

Years later, and unfortunately testcontainers still does not support modern Java (that use JMPS - modules). What a shame!

The error: reads package org.testcontainers.containers from both testcontainers and mongodb (or whatever module)