minio-java icon indicating copy to clipboard operation
minio-java copied to clipboard

module-info/JPMS?

Open Mechite opened this issue 11 months ago • 3 comments

[WARN] **********************************************************************************************************************************************************************************
************************
[WARN] * Required filename-based automodules detected: [minio-8.5.2.jar]. Please don't publish this project to a public artifact repository! *
[WARN] **********************************************************************************************************************************************************************************
************************

As you can see, this Java client is not a JPMS compatible library.

Mechite avatar Jul 21 '23 15:07 Mechite

Feel free to send a PR

balamurugana avatar Jul 21 '23 15:07 balamurugana

See #1474. EDIT - I'd like to reiterate that I don't have the resources to work on this issue further, and am not very familiar with this build (Gradle builds tend to take a while to sink in). I've done the basic changes to give an idea of what changes need to be made and where.

Mechite avatar Jul 21 '23 16:07 Mechite

An alternative approach I can propose is to use the Automatic-Module-Name header in the MANIFEST.MF in order to simply provide a stable name for the module. This is a way of achieving Java 1.8 compatibility without having to compile the module-info separately like a lot of projects have started doing. Downside? Much weaker encapsulation.

https://github.com/aws/aws-sdk-java-v2/ already uses this header to support JPMS.

Mechite avatar Jul 21 '23 17:07 Mechite