Open athspk opened 1 year ago
I use the following workaround to suppress the warning C in build.gradle.kts
:
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask::class) {
forkOptions {
jvmArgs(listOf(
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "java.base/java.io=ALL-UNNAMED",
))
}
}
After upgrading to version 4 of the plugin, the workaround mentioned by @zhangt2333 does not seem to work any more. (forkOptions
has been renamed to jvm
, but the problem persists after renaming.)
Same problem here, passing via JDK_JAVA_OPTIONS or with:
tasks.withType(AbstractAsciidoctorTask).configureEach {
jvm {
jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED")
}
}
does not help anymore to fix that error.
Task :manual:asciidoctorPdf 2024-04-26T14:14:55.107+02:00 [WorkerExecutor Queue] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
I see also the warning if I try to update the asciidoctor-gradle-examples/asciidoc-to-html-example to Gradle 8.6
Changes I did in build.gradle
plugins {
id 'org.asciidoctor.jvm.convert' version '4.0.2'
}
And ingradle/wrapper/gradle-wrapper.properties
#Wed Jan 29 14:51:02 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
Warning:
vogella@laptoplars:~/git/asciidoctor-gradle-examples/asciidoc-to-html-example$ ./gradlew asciidoctor
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
> Task :asciidoctor
2024-05-02T09:18:20.438+02:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
The HTML output is still created.
Versions:
id "org.asciidoctor.jvm.convert" version "3.3.2" gradle version 7.6.1
Task raw output:
Running the asciidoctor task with
./gradlew asciidoctor --warning-mode=all
returned the following warnings in raw output:Warnings:
So I see 3 warnings here (2 deprecation and 1 weird warning).
A.
https://docs.gradle.org/7.6.1/userguide/upgrading_version_7.html#empty_directories_file_tree ADDRESSED IN: https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/641 , https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/629
B.
https://docs.gradle.org/7.6.1/userguide/upgrading_version_7.html#java_exec_properties ADDRESSED IN: https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/602 , https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/611
C.
This is the warning for which I opened this issue.
My other gradle tasks don't produce this warning, only the
asciidoctor
task.I tried to google the 'FilenoUtil' warning line and the results didn't even have to do with either gradle or asciidoctor.
When I run the task with
--info
I saw in the classpath of the execution ofAsciidoctorJavaExec
usingjruby
, which is on the the results I mentioned above.Also, oddly enough, I added both
--add-opens
packages but still saw the warning.Please advise.
Thank you for your time :-)