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-tabsis 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-tabsextension.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-pluginin yourpom.xmlto include the custom script or Maven plugin you created, ensuring it is executed at the right phase of the build lifecycle.A
pom.xmlfile would include theasciidoctor-maven-pluginand a possible custom script or plugin for handling the Asciidoctor Tabs extension.That
pom.xmlis a starting point.your-custom-plugin-artifactIdwould 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.