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

Modularize Maven ai.djl dependency by adding module-info.java #2277

Open
davpapp opened this issue Jan 2, 2023 · 1 comment
Open

Modularize Maven ai.djl dependency by adding module-info.java #2277

davpapp opened this issue Jan 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@davpapp
Copy link

davpapp commented Jan 2, 2023

Description

I'm trying to package my code into an executable with Maven via jpackage. However, I get an error during the jlink step of the process:
Error: automatic module cannot be used with jlink: ai.djl.api from file
ai.djl.api is an automatic module, meaning it cannot be linked. I know I can work around this by manually generating the module-info file, but doing so isn't easy.

Will this change the current api? How?
No

Who will benefit from this enhancement?
Anyone looking to package a Java application that uses the DJL API.

References

Stackover flow instructions on generating module-info.java from automatic module

@davpapp davpapp added the enhancement New feature or request label Jan 2, 2023
@frankfliu
Copy link
Contributor

@davpapp

It's not straight-forward to make DJL a fully modularized library. Many of our dependencies are not support module.

We have a demo application that shows you how to create a module application that depends on DJL.

I created a PR that support jlink/jpackage. The PR leverage https://github.com/beryx/badass-jlink-plugin plugin:

cd djl-demo/development/module
./gradlew jlink
build/image/bin/djl-module-demo

./gradlew jpackage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants