I'm assuming you haven't looked at the Maven site documentation generation yet with the maven-site-plugin. It's pretty robust and will allow you to incorporate and include the JavaDoc generation as well as the content from your OpenOffice document.
While the site documentation doesn't output as a PDF, it does however output as a static HTML website that has lots of capabilities built in. Using Maven profiles, you could configure Maven to generate one site for internal use that includes Surefire test results and other reports for checks like Checkstykle and PMD. In another profile, you could configure it to only generate the documentation necessary for distribution to the clients that doesn't include the internal reports that the clients may not care about.
One note though, much of the site documentation generation is changing for Maven 3. While most of Maven 3 is backwards compatible with Maven 2, be mindful of the reporting changes for Maven 3. Check out these links:
And in case the site plugin with external docs does not produce a high enough quality, you can use docbook with Maven to produce HTML and PDF output. In fact Sonatype does that for all their books (e.g. Maven: The Complete Reference, Nexus book, M2Eclipse book...) and they are open source so you can see how it all works and copy the setup and modify it for your needs. The advantage of using docbook is that the tooling is pretty good (xmlmind for example) and that it produces print quality books with index, toc and so on.
Oh and since you mentioned it there is also a LaTeX plugin for Maven but I have no experience with it (but quite a bit with LaTeX prior to my Maven usage...)
Another solution is the Maven docbkx plugin for conversion of DocBook into PDF; HTML, etc.
Read this description on how to add the converted DocBook to HTML to a Maven project site, if you would like to see your DocBook content also appear in the Maven generated site.
I have a multi-module maven project in which each module has it's own reference-manual written in docbook format. And then I have a general reference manual, also written in docbook that includes the others so I am re-using the documentation.
When I execute mvn site, the project generates HTML and PDF files with all the reference manuals and they are neatly integrated into the maven site.
For this I use the docbkx plugin. I think it really rocks. Here is the plugin configuration:
You can check out my project site here and you can even download the sources into your computer and see how the whole thing is set up.
If you have any questions don't hesitate to reach out.
发布评论
评论(4)
我假设您还没有看过 Maven 站点文档生成但使用 maven-site-plugin。它非常强大,允许您合并并包含 JavaDoc 生成以及 OpenOffice 文档中的内容。
虽然站点文档不会输出为 PDF,但它会输出为静态 HTML 网站,该网站具有许多内置功能。使用 Maven 配置文件,您可以配置 Maven 生成一个供内部使用的站点,其中包括 Surefire 测试结果和其他检查报告,如 Checkstykle 和 PMD。在另一个配置文件中,您可以将其配置为仅生成分发给客户所需的文档,其中不包括客户可能不关心的内部报告。
但需要注意的是,Maven 3 的大部分站点文档生成都发生了变化。虽然 Maven 3 的大部分向后兼容 Maven 2,但请注意 Maven 3 的报告更改。查看以下链接:
Maven 3
I'm assuming you haven't looked at the Maven site documentation generation yet with the maven-site-plugin. It's pretty robust and will allow you to incorporate and include the JavaDoc generation as well as the content from your OpenOffice document.
While the site documentation doesn't output as a PDF, it does however output as a static HTML website that has lots of capabilities built in. Using Maven profiles, you could configure Maven to generate one site for internal use that includes Surefire test results and other reports for checks like Checkstykle and PMD. In another profile, you could configure it to only generate the documentation necessary for distribution to the clients that doesn't include the internal reports that the clients may not care about.
One note though, much of the site documentation generation is changing for Maven 3. While most of Maven 3 is backwards compatible with Maven 2, be mindful of the reporting changes for Maven 3. Check out these links:
Maven 3
如果带有外部文档的站点插件无法产生足够高的质量,您可以使用带有 Maven 的 docbook 来生成 HTML 和 PDF 输出。事实上,Sonatype 对他们的所有书籍(例如 Maven:完整参考、Nexus 书籍、M2Eclipse 书籍...)都是这样做的,并且它们是开源的,因此您可以看到它是如何工作的,并复制设置并根据您的需要进行修改。使用 docbook 的优点是工具非常好(例如 xmlmind),并且它可以生成带有索引、目录等的印刷质量书籍。
哦,既然你提到了,还有一个 Maven 的 LaTeX 插件,但我没有使用它的经验(但在我使用 Maven 之前对 LaTeX 有相当多的了解......)
And in case the site plugin with external docs does not produce a high enough quality, you can use docbook with Maven to produce HTML and PDF output. In fact Sonatype does that for all their books (e.g. Maven: The Complete Reference, Nexus book, M2Eclipse book...) and they are open source so you can see how it all works and copy the setup and modify it for your needs. The advantage of using docbook is that the tooling is pretty good (xmlmind for example) and that it produces print quality books with index, toc and so on.
Oh and since you mentioned it there is also a LaTeX plugin for Maven but I have no experience with it (but quite a bit with LaTeX prior to my Maven usage...)
另一个解决方案是 Maven docbkx 插件,用于将 DocBook 转换为 PDF; HTML 等。
阅读此说明,了解如何添加转换后的 DocBook to HTML 复制到 Maven 项目站点。
有趣的相关问题:
Another solution is the Maven docbkx plugin for conversion of DocBook into PDF; HTML, etc.
Read this description on how to add the converted DocBook to HTML to a Maven project site, if you would like to see your DocBook content also appear in the Maven generated site.
Interesting related questions:
我有一个多模块 Maven 项目,其中每个模块都有自己的以文档格式编写的参考手册。然后我有一个通用参考手册,也是用文档书编写的,其中包括其他内容,因此我正在重复使用该文档。
当我执行 mvn site 时,该项目会生成包含所有参考手册的 HTML 和 PDF 文件,并且它们整齐地集成到 Maven 站点中。
为此,我使用 docbkx 插件。我认为它真的很摇滚。这是插件配置:
您可以在此处查看我的项目站点,甚至可以将源代码下载到您的计算机中看看整个事情是如何设置的。
如果您有任何疑问,请随时与我们联系。
希望它有帮助
干杯
卡洛斯
I have a multi-module maven project in which each module has it's own reference-manual written in docbook format. And then I have a general reference manual, also written in docbook that includes the others so I am re-using the documentation.
When I execute mvn site, the project generates HTML and PDF files with all the reference manuals and they are neatly integrated into the maven site.
For this I use the docbkx plugin. I think it really rocks. Here is the plugin configuration:
You can check out my project site here and you can even download the sources into your computer and see how the whole thing is set up.
If you have any questions don't hesitate to reach out.
Hope it helps
Cheers
Carlos