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

Maven artifact for this project is a shaded jar, which breaks modules #91

Open
marinier opened this issue Aug 4, 2022 · 4 comments
Open

Comments

@marinier
Copy link

marinier commented Aug 4, 2022

The maven artifact deployed publicly is an shaded jar, which means it includes its dependencies directly in the jar as opposed to letting maven include them as dependencies. In Java 9+ projects that also include one of those dependencies, this causes a compilation error because the packages for those dependencies are available from two different modules -- yours and the actual dependency.

E.g., my project depends on both glisten-afterburner (which depends on this project) and indriya. Both depend on javax.inject, but because this project puts the package and classes for javax.inject directly into the jar, we run into this issue (this from a java 17 compile):

[ERROR] path/to/src/main/java/module-info.java: [1,1] module my.project.module reads package javax.inject from both javax.inject and afterburner.mfx

That is, split packages are no longer allowed.

Please deploy a version of this project's maven artifact that isn't a shaded jar!

@marinier marinier changed the title Maven artifact for this project is an uber jar, which breaks modules Maven artifact for this project is a shaded jar, which breaks modules Aug 4, 2022
@aquino-a
Copy link

Is javax.inject in your module-info.java?

@marinier
Copy link
Author

No, should it be?

@koppor
Copy link

koppor commented May 27, 2024

@marinier Maybe you could give our fork at https://github.com/JabRef/afterburner.fx a try. It is published to maven central at https://mvnrepository.com/artifact/org.jabref/afterburner.fx.

@marinier
Copy link
Author

Unfortunately, the version I actually need is afterburner.mfx. If you post a version of that, I'll give it a try.

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

3 participants