asciidoctor / asciidoctorj-diagram

AsciidoctorJ Diagram bundles the Asciidoctor Diagram RubyGem (asciidoctor-diagram) so it can be loaded into the JVM using JRuby.
Apache License 2.0
10 stars 6 forks source link

Cannot upgrade to 2.0.0 when using with asciidoctorj-pdf #10

Closed romge closed 3 years ago

romge commented 3 years ago

I cannot upgrade the version of asciidoctorj-diagram from 1.5.18 to 2.0.0 when using it together with asciidoctorj-pdf 1.5.x and asciidoctor-maven-plugin 1.6.0-2.1.0 The plugin execution fails with the error

[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc (asciidoc-pdf) on project ida2-module: Execution asciidoc-pdf of goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc failed: (ArgumentError) Java package 'classpath' does not have a method `concat' with 1 argument -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc (asciidoc-pdf) on project ida2-module: Execution asciidoc-pdf of goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc failed: (ArgumentError) Java package 'classpath' does not have a method `concat' with 1 argument
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution asciidoc-pdf of goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc failed: (ArgumentError) Java package 'classpath' does not have a method `concat' with 1 argument
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: org.jruby.exceptions.ArgumentError: (ArgumentError) Java package 'classpath' does not have a method `concat' with 1 argument
    at org.jruby.javasupport.JavaPackage.method_missing (org/jruby/javasupport/JavaPackage.java:258)
    at RUBY.<class:PlantUmlConverter> (uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml/converter.rb:18)
    at RUBY.<module:Diagram> (uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml/converter.rb:7)
    at RUBY.<module:Asciidoctor> (uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml/converter.rb:5)
    at RUBY.<main> (uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml/converter.rb:4)
    at org.jruby.RubyKernel.require (org/jruby/RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative (org/jruby/RubyKernel.java:1002)
    at RUBY.<main> (uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml/extension.rb:1)
    at org.jruby.RubyKernel.require (org/jruby/RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative (org/jruby/RubyKernel.java:1002)
    at RUBY.<main> (uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml.rb:2)
    at org.jruby.RubyKernel.require (org/jruby/RubyKernel.java:974)
    at RUBY.require (uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:130)
    at RUBY.<main> (<script>:1)

I thing something changed in asciidoctorj-diagram which leads to this error because it specifically occurs when upgrading it, although the error mentions asciidoc-pdf. If I should be wrong and this is really an issue of asciidoctorj-pdf I will open an issue there.

robertpanzer commented 3 years ago

Can you please try with the latest version asciidoctorj-diagram, i.e. 2.0.5? If you still see the problem can you please provide a reproducer?

romge commented 3 years ago

I forgot to say, that the problem occurs at all Versions from 2.0.0 and above. A reproducer is at https://github.com/romge/asciidoctorj-diagram-issue-10

robertpanzer commented 3 years ago

This require does not look good:

                        <require>asciidoctor-diagram/plantuml</require>

It works fine if I change if to

                        <require>asciidoctor-diagram</require>
romge commented 3 years ago

Yeah, thank you. I don't know where that came from.