I have a Java project with the Maven Assembly plugin. The Assembly Plugin builds a final ZIP release file that contains binary (*.war), config files and some PDF documentation.
The documents are written in Markdown and the PDF docs for the release need to be generated manually (ex. with Markdown to PDF online tool) before I execute the build with Maven. Then the Assembly plugin takes the PDFs and put them to the final ZIP.
Almost every time when I create a release ZIP file, I forgot to generate PDFs manually so usually the final ZIP contains old documentation. This is so bad.
I would like to automate PDF generation. I have checked four MD to PDF maven plugins, but none of them works fine. I have found a plugin to generates MD to HTML (without any default stylesheet) and maybe I can use another plugin to convert HTML to PDF, but it is so painful.
What I tried:
- maven-site-plugin + doxia: only generates HTML, not PDF
- markdown-page-generator-plugin: only generates HTML without default stylesheet, and needs to have external header, footer template HTMLs
- maven-pdf-plugin: makes a big report contains almost the "whole world", not only *.md files
- markdowndoc-maven-plugin: it comes from a different repo and plugin repo, which I am not able to add to the pom.xml, and complicated to use.
Is there any easy way to generate PDF files with Maven, based on the Markdown files during the build process?