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

Asciidoclet failing to load AsciidoctorJ dependency #120

Closed
abelsromero opened this issue Mar 23, 2024 · 0 comments · Fixed by #132
Closed

Asciidoclet failing to load AsciidoctorJ dependency #120

abelsromero opened this issue Mar 23, 2024 · 0 comments · Fixed by #132
Milestone

Comments

@abelsromero
Copy link
Member

version: 2.0.0-snapshot version in main branch

The current version works when using the shaded jar, otherwise mvn javadoc:javadoc failw with

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.6.3:javadoc (default-cli) on project asciidoclet: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 4
[ERROR] javadoc: error - fatal error encountered: java.lang.NoClassDefFoundError: org/asciidoctor/Asciidoctor$Factory
[ERROR] javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page
[ERROR] (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com)
[ERROR] for duplicates. Include error messages and the following diagnostic in your report. Thank you.
[ERROR] java.lang.NoClassDefFoundError: org/asciidoctor/Asciidoctor$Factory
[ERROR]         at org.asciidoctor.asciidoclet.AsciidoctorConverter.<init>(AsciidoctorConverter.java:67)
[ERROR]         at org.asciidoctor.asciidoclet.Asciidoclet.run(Asciidoclet.java:214)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:588)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:432)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
[ERROR] Caused by: java.lang.ClassNotFoundException: org.asciidoctor.Asciidoctor$Factory
[ERROR]         at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
[ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
[ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
[ERROR]         ... 7 more
[ERROR] Command line was: /home/asalgadr/.sdkman/candidates/java/11.0.20-tem/bin/javadoc -J--add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -Xdoclint:all,-html,-accessibility @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/asalgadr/github/asciidoctor-maven-examples/asciidoclet/target/site/apidocs' dir.
@abelsromero abelsromero added this to the 2.0.0 milestone Mar 23, 2024
abelsromero added a commit to abelsromero/asciidoclet that referenced this issue Apr 15, 2024
The shade-plugin alters the pom.xml removing runtime dependencies.
This makes that components consuming asciidoclet cannot resolve required
dependencies like AsciidoctorJ, causing conversion to fail.

closes asciidoctor#120
abelsromero added a commit that referenced this issue Apr 15, 2024
The shade-plugin alters the pom.xml removing runtime dependencies.
This makes that components consuming asciidoclet cannot resolve required
dependencies like AsciidoctorJ, causing conversion to fail.

closes #120
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 a pull request may close this issue.

1 participant