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

Java module system compatibility #292

Open
trurli opened this issue Sep 1, 2020 · 1 comment
Open

Java module system compatibility #292

trurli opened this issue Sep 1, 2020 · 1 comment

Comments

@trurli
Copy link

trurli commented Sep 1, 2020

When upgrading an application depending on artifactory-java-client-services (and therefore artifactory-java-client-api) I ran into the following issue:

Java will create something called an "automatic module" for dependencies which do not (yet) conform to Java's module system introduced with Java 9 based on the JAR's name. In this case the automatic modules "artifactory.java.client.services" and "artifactory.java.client.api" are created.

Unfortunately it is not allowed for two modules referenced by "requires" in a module-info to provide the same package (in this case "org.jfrog.artifactory.client", which is both provided in the automatic "api" and "services" module for API and implementation classes respectively). This means that a modularized application can't be built when using this library. It seems that there is no way around this limitation once the application itself is in a module.

This would not pose a problem as long as the application itself is not modularized, but in this case, the application depends on JavaFX which itself was removed from the JDK from 9 upwards. Migrating the application then requires use of OpenJFX which is itself modularized and in turn requires modularizing the application itself, otherwise it is not possible to use FXMLLoader from a class residing in an unnamed module, then in turn leading to the issue with the automatic modules created from "artifactory-java-client-api" and "artifactory-java-client-services".

It might be possible that I overlook something basic here as I am not too familiar with Java's module system yet. Are there any plans on providing a modularized version of the java artifactory library or do you have any hints on how to resolve this dilemma?

@argenstijn
Copy link

With java 21 now this should already be fixed long time ago. Unusable this client project for me because of this bug!

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

No branches or pull requests

2 participants