Skip to content

Java modules and New Sonatype Infrastructure - #50

Merged
pavly-gerges merged 7 commits into
masterfrom
java-modules
Oct 13, 2026
Merged

pavly-gerges merged 7 commits into
masterfrom
java-modules

Conversation

@pavly-gerges

@pavly-gerges pavly-gerges commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

This PR introduces the following:

  • Java Modules with baseline Java 9.
  • Better exception logging messages with hashing for FileSystem APIs.
  • Updated publishing scripts to the new Sonatype Infrastructure.
  • Deployed a new pre-release.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@pavly-gerges pavly-gerges linked an issue Oct 9, 2026 that may be closed by this pull request
@pavly-gerges

pavly-gerges commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

@stephengold I have no idea about the causative factors of this error; it doesn't happen on my local machine running Oracle JDK 20.0.2:

> Task :snaploader-examples:run FAILED
FAILURE: Build failed with an exception.
Error occurred during initialization of boot layer
* What went wrong:
Execution failed for task ':snaploader-examples:run' (registered by plugin 'org.gradle.application').
> Process 'command '/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/20.0.2-9/x64/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
java.lang.module.FindException: Error reading module: /home/runner/.gradle/caches/modules-2/files-2.1/com.github.stephengold/jolt-jni-Linux64/6.1.1/6c9ab2fcfde9cdc19b718ca906049e2052a36fbb/jolt-jni-Linux64-6.1.1.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Package testjoltjni.app.helloworld not found in module
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org./
BUILD FAILED in 41s

@stephengold

Copy link
Copy Markdown
Contributor

As of 7d41cbe, the Gradle wrapper hasn't been fully updated. Have you tried:

$ ./gradlew :wrapper --gradle-version=9.8.1 && ./gradlew :wrapper

@pavly-gerges

pavly-gerges commented Oct 10, 2026 •

Copy link
Copy Markdown
Member Author

As of 7d41cbe, the Gradle wrapper hasn't been fully updated. Have you tried:

$ ./gradlew :wrapper --gradle-version=9.8.1 && ./gradlew :wrapper

I've just updated the gradle-wrapper.jar and still having the problem.

What is the testjoltjni.app.helloworld and why was it shipped with the API? I believe there is a pointer to this package, but it's not turely shipped...

@pavly-gerges

Copy link
Copy Markdown
Member Author

Problem disappeared after removing mainModule = .... property from the snaploader-examples module.
The warning is back on console and I think it's much related to the Gradle API.

Eventually, I am not keen on continuing this and to fix Gradle API; they are building a very complex tool for a straightforward task. Let me know your opinion. For me, I recommend testing an isolated JAR; maybe an application; if you agree, I will publish a pre-release now on this PR.

@stephengold

Copy link
Copy Markdown
Contributor

jSnapLoader is your project. Ultimately, it's your decision how to build and test it. As long as I don't have to do maintenance on your project, all I care about is the published artifacts.

I'm using Gradle v9.8.1 successfully in dozens of projects, including one that defines a Java module. I'm not convinced the problem you're seeing is related to bugs in Gradle or its wrapper.

If upgrading from Gradle 8 to Gradle 9 is proving difficult, I advise breaking it down into smaller steps: upgrade first to 8.14.6, which should be a relative small step. Then upgrade from there to 9.x .

If and when you upgrade, use gradlew wrapper per the Gradle documentation. Never directly modify the generated files ("gradlew", "gradlew.bat", "gradle-wrapper.jar", and "gradle-wrapper.properties").

@pavly-gerges

Copy link
Copy Markdown
Member Author

If upgrading from Gradle 8 to Gradle 9 is proving difficult, I advise breaking it down into smaller steps: upgrade first to 8.14.6, which should be a relative small step. Then upgrade from there to 9.x .

If and when you upgrade, use gradlew wrapper per the Gradle documentation. Never directly modify the generated files ("gradlew", "gradlew.bat", "gradle-wrapper.jar", and "gradle-wrapper.properties").

Alright, I updated the Gradle wrapper via Gradle 9 binaries. I will try to publish an artifact for isolated testing. I am not keen on fixing the WARNING regarding utilizing native methods, unless it appears on the isolated production testing.

@pavly-gerges pavly-gerges changed the title Java modules Java modules and New Sonatype Infrastructure Oct 13, 2026
@pavly-gerges
pavly-gerges merged commit b779e5c into master Oct 13, 2026
10 of 11 checks passed

This branch had an error being deployed

1 failed deployment
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

Successfully merging this pull request may close these issues.

add module info

2 participants