Using the multi-page converter from maven

Previous Topic Next Topic
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Using the multi-page converter from maven

This works:

asciidoctor -r asciidoctor-multipage -b multipage_html5 -D test test.adoc

But from the same terminal window, this doesn't:


[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc (output-html) on project uom-manual: Execution output-html of goal org.asciidoctor:asciidoctor-maven-plugin:2.1.0:process-asciidoc failed: (LoadError) no such file to load -- asciidoctor-multipage -> [Help 1]

Any ideas?
Reply | Threaded
Open this post in threaded view

Re: Using the multi-page converter from maven

The maven plugin does not use any of your local Ruby installation. It runs it's own "instance" within jRuby and all gems are contained within the different asciidoctor* jars.

If you want to use external gems, you need to use `gemPaths` to point to your Ruby installation path usually under your user directory, but can't confirm extact path in Windows, maybe it's within ruby installation path. BUT I'D RECOMMEND a fully self-contained Maven run that does not deppend on any pre-installation, just check this example, the steps are these:
1. Addd `mavengem-wagon` maven extension.
2. Add rubygems repository
3. Add `gem-maven-plugin` configuration, same as in example. This will download the gems and place them inside `target`.
4. Add required gems (eg. asciidoctor-multipage ) as a `<groupId>rubygems</groupId>` dependency. Keep the example exclusions because asciidoctor gem is already contained in asciidoctorj jar.
5. Configure gemsPath and requires in the `asciidoctor-maven-plugin`:

Pay attention to match the path in `gem-maven-plugin` and `asciidoctor-maven-plugin`.