asciidoctor-gradle-plugin icon indicating copy to clipboard operation
asciidoctor-gradle-plugin copied to clipboard

Files in `manpage` source directory are ignored

Open rsenden opened this issue 2 years ago • 0 comments
trafficstars

Plugin: id "org.asciidoctor.jvm.convert" version "3.3.2"

I have a directory structure as follows:

  • build/generated-docs/src/index.adoc (general documentation page)
  • build/generated-docs/src/manpage/*.adoc (picocli-generated manpages in AsciiDoc format)

I have two tasks of type org.asciidoctor.gradle.jvm.AsciidoctorTask configured:

  • asciiDoctorHtml5:
    • Backend: html5
    • sourceDir: build/generated-docs/src
  • asciiDoctorManPage:
    • Backend: manpage
    • sourceDir: build/generated-docs/src/manpage

Findings:

  • With the configuration above, the HTML5 task is working just fine, but the ManPage task refuses to process any files.
  • If I rename the manpage directory to any other name, the ManPage task happily processes the files.
  • If I point the source directory for the ManPage task to build/generated-docs/src, the task happily picks up both index.adoc and the files in the manpage directory (throwing an error on index.adoc though because it's not a proper manual page).
  • If I point the source directory for the ManPage task to build/generated-docs/src and use the sources property to either exclude index.adoc, or to only include all files in the manpage directory, again the task doesn't pick up any files to be converted.

Any particular reason for this behavior? Any work-around available? I'd prefer not to rename the directory as that would also be reflected in the HTML output, potentially breaking existing links/bookmarks. Of course I could rename the directory back to manpage in another build task, but that would complicate our build setup.

rsenden avatar Mar 17 '23 14:03 rsenden