In the asciidoctor-maven-plugin, I can add extensions, but I need to specify a GAV and classname.
How do I add the asciidoctor-tabs extension to enable tabs in adoc files?
As far as I can tell, the tabs functionality might not exist on Maven Central.
Actually,
asciidoctor/asciidoctor-tabs
is written in Ruby, which complicates its direct use with Maven.You might need to run that extension within a JRuby environment, which means creating a custom script that utilizes JRuby to run the
asciidoctor-tabs
extension.You might consider creating a custom Maven plugin that invokes this script during your build process. That plugin can be configured to execute the JRuby script as part of the Maven build lifecycle.
Make sure all necessary dependencies, including JRuby and the
asciidoctor-maven-plugin
, are correctly set up in yourpom.xml
.Then configure the
asciidoctor-maven-plugin
in yourpom.xml
to include the custom script or Maven plugin you created, ensuring it is executed at the right phase of the build lifecycle.A
pom.xml
file would include theasciidoctor-maven-plugin
and a possible custom script or plugin for handling the Asciidoctor Tabs extension.That
pom.xml
is a starting point.your-custom-plugin-artifactId
would refer to a custom Maven plugin you would need to create to handle the Asciidoctor Tabs extension. You would implement a Maven Mojo (Maven plain Old Java Object) that defines your plugin's goal. Inside the Mojo, write Java code to invoke JRuby and run the asciidoctor-tabs Ruby script. You will need to pass the relevant Asciidoc files to the script.