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

Add module-info.java #32

Closed
robertvazan opened this issue Dec 24, 2021 · 7 comments
Closed

Add module-info.java #32

robertvazan opened this issue Dec 24, 2021 · 7 comments

Comments

@robertvazan
Copy link

Please add module-info.java. It will ease use of the library in dependent libraries and applications that are using Java 9 modules. In order to do this, you either have to upgrade to Java 9+ or create multi-release JAR. Given how old Java 8 is, I would recommend upgrading to Java 9 or even Java 11. It's much simpler than building multi-release JARs. Java 8 libs and apps can keep using older versions of the library.

@robertvazan
Copy link
Author

PS: Probably the easiest thing to do is to make jnbis an automatic module.

@mhshams
Copy link
Owner

mhshams commented Jan 1, 2022

Possibly implemented in v2.1.0. need verification.

I've done a quick check and it seemed ok.

@mhshams mhshams closed this as completed Jan 1, 2022
@robertvazan
Copy link
Author

This wouldn't build, at least not under Java 17. Try to run mvn package or mvn install locally. A number of plugins (at least source & javadoc) need to be updated to their latest version. After that, I get moditect error:

[ERROR] Failed to execute goal org.moditect:moditect-maven-plugin:1.0.0.RC2:add-module-info (add-module-info) on project jnbis: Execution add-module-info of goal org.moditect:moditect-maven-plugin:1.0.0.RC2:add-module-info failed: Couldn't parse /home/rv/Workspace/eclipse/jnbis/target/moditect/jnbis/module-info.java -> [Help 1]

Moditect plugin seems misconfigured. It seems to expect module-info.java under src/moditect (example) with only short config in pom.xml (example).

@robertvazan
Copy link
Author

I have also tried the prebuilt binary from Maven Central. That one has valid module-info.java, but it does not export org.jnbis.api package, only its subpackages. Please add the package to moditect config.

@mhshams mhshams reopened this Jan 2, 2022
@mhshams
Copy link
Owner

mhshams commented Jan 2, 2022

This wouldn't build, at least not under Java 17. Try to run mvn package or mvn install locally. A number of plugins (at least source & javadoc) need to be updated to their latest version. After that, I get moditect error:

[ERROR] Failed to execute goal org.moditect:moditect-maven-plugin:1.0.0.RC2:add-module-info (add-module-info) on project jnbis: Execution add-module-info of goal org.moditect:moditect-maven-plugin:1.0.0.RC2:add-module-info failed: Couldn't parse /home/rv/Workspace/eclipse/jnbis/target/moditect/jnbis/module-info.java -> [Help 1]

Moditect plugin seems misconfigured. It seems to expect module-info.java under src/moditect (example) with only short config in pom.xml (example).

I'd built the module with java 11 both locally and in the pipeline (github actions).

I tried java 17 and had the same issue with the plugins. after updating them build is green now. If you are tying the build locally, don't forget to clean before package or install .

@mhshams
Copy link
Owner

mhshams commented Jan 2, 2022

I have also tried the prebuilt binary from Maven Central. That one has valid module-info.java, but it does not export org.jnbis.api package, only its subpackages. Please add the package to moditect config.

sorry about this. I had to check the plugin patterns carefully. It's fixed now and i'll push a patch release today.

@mhshams mhshams closed this as completed Jan 3, 2022
@robertvazan
Copy link
Author

I just tested it and it works. Thank you.

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