Closed dakusui closed 3 months ago
Remaining Issue (1):
Following warnings are printed during mvn compile
(Java 21.0.2).
A
[INFO] --- maven-compiler-plugin:3.12.1:compile (default-compile) @ asciidoclet ---
[WARNING] ****************************************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [asciidoctorj-2.5.12.jar, asciidoctorj-api-2.5.12.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] ****************************************************************************************************************************************************************************
B
[WARNING] system modules path not set in conjunction with -source 17
C
[INFO] /home/hiroshi/Documents/github/asciidoctor/asciidoclet/src/main/java/org/asciidoctor/asciidoclet/AsciidoctorConverter.java: Some input files use or override a deprecated API.
[INFO] /home/hiroshi/Documents/github/asciidoctor/asciidoclet/src/main/java/org/asciidoctor/asciidoclet/AsciidoctorConverter.java: Recompile with -Xlint:deprecation for details.
Remaining Issue (2):
Following warnings are printed during mvn package
(mvn-javadoc-plugin
; Java 21.0.2)
[INFO] --- maven-javadoc-plugin:3.6.3:jar (attach-javadocs) @ asciidoclet ---
[INFO] No previous run data found, generating javadoc.
[WARNING] Javadoc Warnings
[WARNING] Mar 28, 2024 7:59:27 AM uri:classloader:/gems/asciidoctor-2.0.22/lib/asciidoctor/parser.rb parse
[WARNING] WARNING: README.adoc: line 115: section title out of sequence: expected level 1, got level 2
[WARNING] Mar 28, 2024 7:59:27 AM uri:classloader:/gems/asciidoctor-2.0.22/lib/asciidoctor/parser.rb parse
[WARNING] WARNING: README.adoc: line 152: section title out of sequence: expected level 1, got level 2
[WARNING] Mar 28, 2024 7:59:27 AM uri:classloader:/gems/asciidoctor-2.0.22/lib/asciidoctor/parser.rb parse
[WARNING] WARNING: README.adoc: line 182: section title out of sequence: expected level 1, got level 2
[WARNING] Mar 28, 2024 7:59:27 AM uri:classloader:/gems/asciidoctor-2.0.22/lib/asciidoctor/parser.rb parse
[WARNING] WARNING: README.adoc: line 203: section title out of sequence: expected level 1, got level 2
[WARNING] Mar 28, 2024 7:59:28 AM uri:classloader:/gems/asciidoctor-2.0.22/lib/asciidoctor/reader.rb resolve_include_path
[WARNING] WARNING: include file has illegal reference to ancestor of jail; recovering automatically
[WARNING] Mar 28, 2024 7:59:28 AM uri:classloader:/gems/asciidoctor-2.0.22/lib/asciidoctor/reader.rb resolve_include_path
[WARNING] WARNING: include file has illegal reference to ancestor of jail; recovering automatically
[WARNING] A non-LazyDocCommentTable instance is passed. Ignoring.
[WARNING] 1 warning
Remaining Issue (3):
Following warnings are printed during mvn package
(mvn-shade-plugin
; Java 21.0.2)
[INFO] Dependency-reduced POM written at: /home/hiroshi/Documents/github/asciidoctor/asciidoclet/dependency-reduced-pom.xml
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] asciidoclet-2.0.0-SNAPSHOT.jar, asciidoctorj-2.5.12.jar, asciidoctorj-api-2.5.12.jar, asm-9.2.jar, asm-analysis-9.2.jar, asm-commons-9.2.jar, asm-tree-9.2.jar, asm-util-9.2.jar, backport9-1.13.jar, dirgra-0.3.jar, invokebinder-1.13.jar, jcodings-1.0.58.jar, jcommander-1.82.jar, jffi-1.3.13-native.jar, jffi-1.3.13.jar, jitescript-0.4.1.jar, jnr-a64asm-1.0.0.jar, jnr-constants-0.10.4.jar, jnr-enxio-0.32.17.jar, jnr-ffi-2.2.16.jar, jnr-netdb-1.2.0.jar, jnr-posix-3.1.19.jar, jnr-unixsocket-0.38.22.jar, jnr-x86asm-1.0.2.jar, joda-time-2.12.5.jar, joni-2.2.1.jar, jruby-9.4.6.0.jar, jruby-base-9.4.6.0.jar, jruby-stdlib-9.4.6.0.jar, jzlib-1.1.5.jar, options-1.6.jar define 1 overlapping resource:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] jruby-9.4.6.0.jar, jruby-stdlib-9.4.6.0.jar define 4 overlapping resources:
[WARNING] - META-INF/BSDL
[WARNING] - META-INF/COPYING
[WARNING] - META-INF/LEGAL
[WARNING] - META-INF/LICENSE.RUBY
[WARNING] maven-shade-plugin has detected that some files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the file is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See https://maven.apache.org/plugins/maven-shade-plugin/
I reverted a few changes in pom.xml since the JDK11 compiled version may work with JDK17 and JDK21. I am still checking.
I am still checking.
If you prefer, mark the PR as a draft while still making changes. And thanks a lot for the effort.
I believe the compiled binary by JDK11 works under JDK21. The rendered result is found here: https://dakusui.github.io/doclet-exercise/en/apidocs/index.html
This is generated for this repo: https://github.com/dakusui/doclet-exercise
@dakusui About the other comments you mentioned:
Following warnings are printed during
mvn compile
(Java 21.0.2).A
It's OK: this warning is normal because AsciidoctoJ does not define Java module. This should be fixed upstream.
B
Its OK.
It comes from the <source>
in the maven-compiler-plugin
. In theory for Java > 11 we should use <release>
but that prevents the use of opens
that we need. Truth be told, we are really pushing things hard with all the opens
and exports
, so warnings are expected.
C
I see you saw the issues :clap: . The code was still using methods labeled as @deprecated
in AscidoctorJ.
Remaining Issue (2): Following warnings are printed during mvn package (mvn-javadoc-plugin; Java 21.0.2)
I don't see it in the current commit, Contratulations on fixing it! :tada:
Remaining Issue (3):
Following warnings are printed during mvn package (mvn-shade-plugin; Java 21.0.2)
Don't worry, this can be addressed separately https://github.com/asciidoctor/asciidoclet/issues/120. Ideally, we should not need to publish a fatJar. A fatJar includes AsciidoctorJ which means we should need to do a release every time there's a new AsciidoctorJ. Doing a test without a fatJat, I saw that the jadavoc-plugin detects and downloads dependencies like AsciidoctorJ, but :shrug: for whatever reason does not add it to the classpath.
My end-to-end test on Java 21 is generating a weird header. Do you see the same?
If you prefer we can merge as Java 17 works fine and work on java 21 in another PR. The build works fine, I assume it's a styles thing :crossed_fingers:
EDIT: Looking a how javadocs are build for theasciidoctor-maven-plugin
I see the white element is a new button and the other text is a new div
and both by default apply display:none;
and are not present when building with Java 17.
Adding the lines below the stylesheet17.css
worked, given these elements are new, I think we can leave them with a comment. No need to have a full new file for Java 21.
ul.sub-nav-list-small {
display: none;
}
button#navbar-toggle-button {
display:none;
}
Actually, I didn't. Mine shows this, which is less weird than yours.
After adding the suggested change, it became like this:
This is a pull request for your information. So far, I made sure that this works with Java17 and Java21. The rendered JavaDoc by the modified AsciiDoclet with Java 21 is found here.
https://dakusui.github.io/asciidoclet-2/
I am now removing unnecessary changes from the PR for your convenience.