### HelloWorld3.groovy Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/relative-path-treatment/level-1-1/level-2-1/HelloWorld3.adoc This Groovy script is an example used for testing relative path treatment in Asciidoctor Maven Plugin. ```groovy println "Hello World 3!" ``` -------------------------------- ### Start Asciidoctor Live Preview Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Execute the Maven command to start the live preview server. The output will be accessible via a web browser. ```bash # Start live preview — opens at http://localhost:8080/manual (no .html needed) mvn asciidoctor:http ``` -------------------------------- ### Java Hello World Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-converter-doxia-module/src/test/resources/errors/document-with-missing-include.adoc A standard Java program that prints 'Hello, World' to the console. This is a basic example of a Java application. ```java public class HelloWorld { public static void main(String[] args) { // Prints "Hello, World" to the terminal window. System.out.println("Hello, World"); } } ``` -------------------------------- ### Include Processor Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/processors-sample.adoc An example of the include processor used to embed content from a remote URL. This is useful for including files like Gemfiles or other configuration files directly into your documentation. ```ruby include::https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/Gemfile[] ``` -------------------------------- ### Configure http Goal in Maven Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/goals/http.adoc Configure the http goal within the pom.xml to convert AsciiDoc files and start an HTTP server. This example sets the port to 8080. ```xml ... output-html generate-resources http 8080 ``` -------------------------------- ### Configure Asciidoctor Maven Plugin for Live Preview Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Configure the asciidoctor-maven-plugin to start an embedded HTTP server for live HTML previews. Set the port and default home page. ```xml org.asciidoctor asciidoctor-maven-plugin 3.2.0 true left font live-preview generate-resources http 8080 index ``` -------------------------------- ### Resource Configuration Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/partials/process-asciidoc-mojo-parameters.adoc Defines resource files to be copied to the output directory. Supports specifying directories to copy from, target paths, and includes/excludes for specific file types. This configuration follows patterns similar to the maven-resources-plugin. ```xml DIRECTORY OUTPUT_DIR **/.txt **/*.jpg **/*.gif ... ``` -------------------------------- ### HelloWorld4.groovy Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/relative-path-treatment/level-1-1/level-2-2/level-3-1/HelloWorld4.adoc This snippet shows a basic Groovy script named HelloWorld4.groovy. It is intended to be processed by Asciidoctor, potentially demonstrating include directives or other Asciidoctor features. ```groovy println "Hello World 4" ``` -------------------------------- ### Shared configuration for process-asciidoc and auto-refresh goals Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/goals/auto-refresh.adoc This example shows how to apply configuration at the top plugin level, which is processed by both `process-asciidoc` and `auto-refresh` goals. Configuration within `` for `auto-refresh` is ignored due to Maven limitations. ```xml org.asciidoctor asciidoctor-maven-plugin {release-version} true coderay ./images left font asciidoc-to-html generate-resources process-asciidoc true ``` -------------------------------- ### Block Processor Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/processors-sample.adoc Demonstrates a custom block processor, indicated by the '[yell]' attribute. This processor transforms the enclosed content, in this case, making it stand out or applying specific styling. ```asciidoc [yell] ---- The time is now. Get a move on. ---- ``` -------------------------------- ### Include HelloWorld3.groovy Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/relative-path-treatment/level-1-1/level-2-2/HelloWorld3.adoc This snippet shows how to include the content of the HelloWorld3.groovy file within an Asciidoctor document. It is part of the relative path treatment examples. ```groovy include::HelloWorld3.groovy[] ``` -------------------------------- ### Maven Plugin Setup for process-asciidoc Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/goals/process-asciidoc.adoc Configure the Asciidoctor Maven plugin within your pom.xml to execute the `process-asciidoc` goal. Specify an execution ID, the Maven phase (e.g., `generate-resources`), and the goal itself. ```xml ... output-html generate-resources process-asciidoc ``` -------------------------------- ### Custom Inline Block Macro Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/processors-sample.adoc Shows how to use a custom inline block macro, demonstrated here with the 'man' macro for referencing man pages. Ensure the man macro is properly configured or available in your Asciidoctor environment. ```asciidoc See man:gittutorial[7] to get started. ``` -------------------------------- ### Preserve Directory Structure Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/partials/process-asciidoc-mojo-parameters.adoc Illustrates how to maintain the original folder structure for converted documents in the output directory. When enabled, output files are generated in the same hierarchical layout as the source files. ```text ├── docs ├── docs │ ├── examples.adoc │ ├── examples.html │ └── examples => │ └── examples │ ├── html.adoc │ ├── html.html │ └── docbook.adoc │ └── docbook.html └── index.adoc └── index.html ``` -------------------------------- ### Custom Block Macro Example Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/processors-sample.adoc Illustrates the usage of a custom block macro named 'gist'. This macro is typically used to embed content from external sources like GitHub gists. ```asciidoc .My Gist gist::123456[] ``` -------------------------------- ### Setup auto-refresh goal in Maven Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/goals/auto-refresh.adoc Configure the auto-refresh goal within the plugin's executions. Specify a unique ID, the Maven phase, and the goal itself. ```xml ... output-html generate-resources auto-refresh ``` -------------------------------- ### Multiple Outputs for Same File with Asciidoctor Maven Plugin Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/usage.adoc Configure the plugin to generate multiple outputs for the same AsciiDoc source file by defining separate executions. This example shows conversions to both HTML and DocBook. ```xml org.asciidoctor asciidoctor-maven-plugin {release-version} output-html generate-resources process-asciidoc html false coderay output-docbook generate-resources process-asciidoc docbook book src/main/asciidoc true ``` -------------------------------- ### Start Asciidoctor Auto-Refresh Watcher Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Initiate the Asciidoctor Maven plugin's auto-refresh watcher to perform live re-conversions on file changes. The watcher runs until explicitly stopped. ```bash # Start the watcher (runs until you type exit/quit) mvn asciidoctor:auto-refresh # or via phase mvn generate-resources ``` -------------------------------- ### Maven Site Integration with Asciidoctor Configuration Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/site-integration/pages/parser-module-setup-and-configuration.adoc Configure Asciidoctor options, attributes, and exclusions within the maven-site-plugin configuration block. This example includes setting a source highlighter and ignoring internal AsciiDoc files. ```xml org.apache.maven.plugins maven-site-plugin {maven-site-plugin-version} asciidoctor-diagram coderay style **/_*.adoc,**/_*/ org.asciidoctor {doxia-module-name} {release-version} ``` -------------------------------- ### Configure Asciidoctor Maven Plugin for Batch Conversion Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Configure the `asciidoctor-maven-plugin` within your `pom.xml` to convert AsciiDoc sources to HTML during the `generate-resources` phase. This example demonstrates setting source and output directories, backend, doctype, and various attributes like table of contents, icons, and source highlighting. ```xml org.asciidoctor asciidoctor-maven-plugin 3.2.0 convert-to-html generate-resources process-asciidoc src/docs/asciidoc ${project.build.directory}/html html5 article true true left font coderay ./images true false ``` -------------------------------- ### Configure Build Failure on Asciidoctor Errors Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/partials/process-asciidoc-mojo-parameters.adoc Use this configuration to control build failure based on Asciidoctor message severity. Setting `outputToConsole` to `false` prevents messages from being shown as INFO in Maven output, while the `failIf` block specifies conditions that will cause a `BUILD FAILURE`. The example shows how to fail on any message with severity `DEBUG` or higher. ```xml false DEBUG ``` -------------------------------- ### Maven Properties to Asciidoctor Attributes Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/site-integration/pages/parser-module-setup-and-configuration.adoc Demonstrates how Maven properties are passed as Asciidoctor attributes. Maven properties with dots are converted to attributes with hyphens. This example shows a Maven property 'my-site.version' being passed as 'my-site-version' to the Asciidoctor converter. ```xml 2.3.0 ``` -------------------------------- ### Build Maven Site with Asciidoctor Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Execute the Maven command to generate the site, which will process AsciiDoc files using the configured plugin. ```bash mvn site:site ``` -------------------------------- ### Set Source and Output Directories via Command Line Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/command-line-configuration.adoc Use system properties to specify the source and output directories for Asciidoctor processing when running Maven. ```bash mvn generate-resources -Dasciidoctor.sourceDirectory=src/docs -Dasciidoctor.outputDirectory=target/docs ``` -------------------------------- ### Configure DocBook Backend Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/v2-migration-guide.adoc Set the backend explicitly to 'docbook' for backward compatible configuration. ```xml docbook ``` -------------------------------- ### Generate Maven Site with Asciidoctor Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Run the Maven site generation command. This will process AsciiDoc sources and integrate them into the project's site. ```bash # AsciiDoc sources: src/site/asciidoc/*.adoc → target/site/*.html mvn site:site ``` -------------------------------- ### Include Groovy Script Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/relative-path-treatment/HelloWorld.adoc Includes the HelloWorld.groovy script. Ensure the script is located at the specified path relative to the Asciidoctor configuration. ```groovy include::HelloWorld.groovy[] ``` -------------------------------- ### Ruby Hello World Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-parser-doxia-module/src/it/maven-site-plugin/src/site/asciidoc/sample.adoc A basic Ruby program that prints 'Hello, World!' to the console. ```ruby puts "Hello, World!" ``` -------------------------------- ### Generate Documentation in Version-Specific Folders Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/tips-and-tricks.adoc Use the Maven `project.version` property to specify a custom output directory that includes the project's version. This helps in organizing documentation for different releases. ```xml ... target/generated-docs/${project.version} ... ``` -------------------------------- ### Add AsciiDoc Navigation to Maven Site Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Define navigation items in `src/site/site.xml` for AsciiDoc pages to be included in the Maven Site's menu structure. ```xml ``` -------------------------------- ### Configure Multiple Output Backends Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Define multiple executions to render the same source files into different formats (e.g., HTML and DocBook) within a single Maven build. Shared options are configured at the top level. ```xml org.asciidoctor asciidoctor-maven-plugin 3.2.0 src/main/asciidoc true output-html generate-resources process-asciidoc html false coderay output-docbook generate-resources process-asciidoc docbook book ``` -------------------------------- ### Generate Version-Stamped Documentation Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Run the Maven `generate-resources` goal to produce documentation in version-stamped directories, e.g., `target/generated-docs/2.1.0/`. ```bash # Output lands in target/generated-docs/2.1.0/ mvn generate-resources ``` -------------------------------- ### Add Version and Build Date to Document Headers Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/tips-and-tricks.adoc Automatically include the project version and build date in the header and footer of generated documents. Configure `maven.build.timestamp.format` in properties for custom date formatting. ```xml yyyy-MM-dd HH ... ... ${project.version} ${maven.build.timestamp} ${project.organization.name} ... ``` -------------------------------- ### Copy Additional Assets with Resources Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Configure the `resources` block to copy non-AsciiDoc files like images, CSS, and fonts to the output directory. This follows the pattern of `maven-resources-plugin`. ```xml ${project.build.directory}/generated-docs src/docs/asciidoc/images images **/*.png **/*.jpg **/*.svg **/*.tmp src/docs/asciidoc/css css ``` -------------------------------- ### Site Navigation Menu Item Configuration Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/site-integration/pages/parser-module-setup-and-configuration.adoc Define a menu item in your site.xml to link to the HTML page generated from an AsciiDoc file. ```xml ... ... ``` -------------------------------- ### Run Unit Tests with Maven Wrapper Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/project/pages/contributing.adoc Execute unit tests using the Maven wrapper. This is the standard way to run tests during development. ```bash ./mvnw clean test ``` -------------------------------- ### Run Integration Tests with Maven Wrapper Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/project/pages/contributing.adoc Execute integration tests using the Maven wrapper with the 'run-its' profile. This command skips unit tests and focuses solely on integration tests. ```bash ./mvnw clean verify -DskipTests -Prun-its ``` -------------------------------- ### Configure Multiple Attributes via Command Line Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/command-line-configuration.adoc Provide multiple attributes to Asciidoctor via the command line, separated by spaces. Use quotes if attribute values contain spaces. ```bash mvn generate-resources -Dasciidoctor.attributes="toc=right source-highlighter=highlight.js imagesdir=my_images" ``` -------------------------------- ### Configure Attributes via Command Line (Single Attribute) Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/command-line-configuration.adoc Add or update a single attribute for Asciidoctor processing directly from the command line. This appends to existing attributes. ```bash mvn generate-resources -Dasciidoctor.attributes=toc=right ``` -------------------------------- ### Run Asciidoctor Conversion Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Execute the Maven goal to trigger the Asciidoctor conversion process configured in the `pom.xml`. ```bash mvn generate-resources ``` -------------------------------- ### Configure HTML Conversion in Maven Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/introduction.adoc Configure the Asciidoctor Maven Plugin to convert AsciiDoc files to HTML. Specify the output directory and attributes like source highlighter, image directory, and table of contents. ```xml ... ... org.asciidoctor asciidoctor-maven-plugin {release-version} convert-to-html generate-resources process-asciidoc ${project.build.directory}/html coderay ./images left font ... ``` -------------------------------- ### Include Groovy Script Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/relative-path-treatment/level-1-1/HelloWorld22.adoc Includes the content of the HelloWorld2.groovy script. This is useful for referencing external script logic within the Asciidoctor document. ```groovy include::HelloWorld2.groovy[] ``` -------------------------------- ### Include Remote File from GitHub Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/github-include.adoc Include content directly from a remote URL, such as a file on GitHub. Requires a compatible Ruby environment. ```xml include::https://raw.githubusercontent.com/cometd/cometd/4.0.x/pom.xml[] ``` -------------------------------- ### Configure Version-Stamped Documentation Output Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Configure the Asciidoctor Maven Plugin to output documentation into version-specific subdirectories using Maven project properties for `revnumber` and `revdate`. ```xml target/generated-docs/${project.version} ${project.version} ${maven.build.timestamp} ``` -------------------------------- ### Minimal Asciidoctor Maven Plugin Configuration Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/usage.adoc Add this minimal configuration to your pom.xml to convert AsciiDoc documents to HTML. Ensure the plugin version is set appropriately. ```xml org.asciidoctor asciidoctor-maven-plugin ${asciidoctor.maven.plugin.version} asciidoc-to-html generate-resources process-asciidoc ``` -------------------------------- ### Configure Asciidoctor Auto-Refresh Goal Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Set up the `auto-refresh` goal to monitor source files for changes and automatically re-convert documents. Configure `interval` for refresh frequency and `refreshOn` (regex) to trigger a full rebuild on specific file changes. ```xml org.asciidoctor asciidoctor-maven-plugin 3.2.0 true coderay left font 1000 .*_.*\.adoc auto-refresh-docs generate-resources auto-refresh ``` -------------------------------- ### Configure Asciidoctor to Warn on Missing Attributes and Fail Build Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/pages/tips-and-tricks.adoc Configure the plugin to treat missing attributes as warnings and then fail the build if any warnings are encountered. This ensures that all attributes are correctly defined. ```xml warn WARN ``` -------------------------------- ### Include Non-Standard Source File Extensions Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Configure `sourceDocumentExtensions` to include files with extensions other than the default `.ad`, `.adoc`, or `.asciidoc` as AsciiDoc sources. ```xml txt asciidoc ``` -------------------------------- ### Configure Asciidoctor Log Handling and Build Failure Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Configure the `logHandler` to control AsciidoctorJ log messages and define conditions for Maven build failure. Set `failIf` with `severity` and/or `containsText` to trigger failures. ```xml true true false WARN warn ``` -------------------------------- ### Configure Asciidoctor Parser Doxia Module in Maven Site Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Integrate the `asciidoctor-parser-doxia-module` with the `maven-site-plugin` to enable AsciiDoc processing for Maven sites. This configuration sets source highlighter and section numbering attributes, and excludes specific Asciidoc files. ```xml org.apache.maven.plugins maven-site-plugin 3.21.0 coderay true **/_*.adoc,**/_*/ org.asciidoctor asciidoctor-parser-doxia-module 3.2.0 ``` -------------------------------- ### Asciidoctor Extensions Configuration Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/partials/process-asciidoc-mojo-parameters.adoc Configure Asciidoctor extensions, specifying the implementation class and optionally a block name for specific processor types. Extensions must be on the plugin's execution classpath. ```xml ... ... org.asciidoctor.maven.SomePreprocessor org.asciidoctor.maven.SomeBlockProcessor yell <!--1--> org.asciidoctor.maven my-asciidoctor-extensions 1.0.0 ``` -------------------------------- ### Include Maven POM Snippet Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-converter-doxia-module/src/it/maven-site-plugin/src/site/asciidoc/file-with-toc.adoc This XML snippet demonstrates how to include a specific tagged section from a Maven POM file using Asciidoctor's include directive. ```xml include::../../../pom.xml[tag=plugin-decl] ``` -------------------------------- ### Set and Unset Boolean Attributes in XML Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/plugin/partials/setting-boolean-attributes.adoc Demonstrates how to set boolean attributes to true or false using XML configuration. Use an empty tag or 'true' to enable, and 'false' to disable. ```xml true false ``` -------------------------------- ### Minimal Asciidoctor Maven Plugin Configuration Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/README.adoc Configure the plugin in your pom.xml to convert AsciiDoc files during the generate-resources phase. Ensure the plugin version matches your project's requirements. ```xml org.asciidoctor asciidoctor-maven-plugin {release-version} asciidoc-to-html generate-resources process-asciidoc ``` -------------------------------- ### Include HelloWorld2.groovy in Asciidoctor Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-maven-plugin/src/test/resources/src/asciidoctor/relative-path-treatment/level-1-1/HelloWorld2.adoc This snippet shows how to include an external Groovy file within an Asciidoctor document. Ensure the HelloWorld2.groovy file is located in the correct relative path for the include directive to work. ```asciidoc [source,groovy] .HelloWorld2.groovy ---- include::HelloWorld2.groovy[] ---- ``` -------------------------------- ### Configure Asciidoctor Converter Doxia Module for Maven Site Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Integrate Asciidoctor with the maven-site-plugin for full-fidelity AsciiDoc support. Configure custom templates, extra Ruby gems, attributes, and logging. ```xml org.apache.maven.plugins maven-site-plugin 3.21.0 src/site/asciidoc/templates asciidoctor-diagram coderay style font true ERROR **/_*.adoc,**/_*/ org.asciidoctor asciidoctor-converter-doxia-module 3.2.0 ``` -------------------------------- ### Update Maven Site Plugin Configuration Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/docs/modules/site-integration/pages/v3-migration-guide.adoc When migrating to version 3.x.x, rename the maven-site-plugin dependency from `asciidoctor-maven-plugin` to `asciidoctor-converter-doxia-module`. Ensure the correct versions for the Doxia module and the plugin are specified. ```xml org.apache.maven.plugins maven-site-plugin {maven-site-plugin-version} org.asciidoctor {doxia-compatible-module-name} {release-version} ``` -------------------------------- ### Maven Site Integration with Asciidoctor Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/README.adoc Integrate Asciidoctor with the Maven site plugin by adding the asciidoctor-parser-doxia-module dependency. This allows AsciiDoc files to be processed as part of the Maven site generation. ```xml org.apache.maven.plugins maven-site-plugin {maven-site-plugin-version} org.asciidoctor asciidoctor-parser-doxia-module {release-version} ``` -------------------------------- ### Include Groovy Script Source: https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/main/asciidoctor-converter-doxia-module/src/test/resources/main-document.adoc This snippet shows how to include a Groovy script file within an Asciidoctor document. Ensure the 'includes/groovy-include.groovy' file exists in the correct path. ```groovy include::includes/groovy-include.groovy[] ``` -------------------------------- ### Target Specific Source File Source: https://context7.com/asciidoctor/asciidoctor-maven-plugin/llms.txt Use `sourceDocumentName` to process a single named AsciiDoc file instead of an entire directory. Ensure `outputFile` and `backend` are also specified for this targeted conversion. ```xml manual.adoc ${project.build.directory}/docs/manual.pdf pdf ```