asciidoctor / asciidoctorj-pdf

AsciidoctorJ PDF bundles the Asciidoctor PDF RubyGem (asciidoctor-pdf) so it can be loaded into the JVM using JRuby.
Apache License 2.0
36 stars 17 forks source link

Build error with asciidoctor-pdf 1.5.0.beta3 #26

Closed robertpanzer closed 4 years ago

robertpanzer commented 4 years ago

Just to keep track of it as I don't have time right now to dig deeper into it: When building asciidoctorj-pdf 1.5.0-beta.3 both unit and integration tests fail while registering fonts:

Caused by: org.jruby.exceptions.RaiseException: (ENOENT) No such file or directory - notoserif-regular-subset.ttf not found in uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/data/fonts
    at RUBY.block in register_fonts(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:3333)
    at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1343)
    at org.jruby.RubyEnumerable.inject(org/jruby/RubyEnumerable.java:936)
    at RUBY.block in register_fonts(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:3325)
    at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1343)
    at RUBY.register_fonts(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:3324)
    at RUBY.init_pdf(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:323)
    at RUBY.convert_document(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:159)
    at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:134)
    at RUBY.convert(uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor/document.rb:1190)
    at RUBY.convert(uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1521)
    at RUBY.block in convert_file(uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1595)
    at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1156)
    at RUBY.convert_file(uri:classloa

This file clearly is in the generated jar though.

robertpanzer commented 4 years ago

Oh, just seeing that this changed in beta.3 and that it tries to read files which are probably not available in our environment.

robertpanzer commented 4 years ago

Created https://github.com/asciidoctor/asciidoctor-pdf/issues/1250 which seems to be the reason.

robertpanzer commented 4 years ago

Released asciidoctorj 1.5.0-beta.4.