Somehow I have not written a note about this before.
Maven site plugin can help you to publish your documentation — also if it is written in markdown. You just need to use doxia-module-markdown module and configure it to be used with the site.
See instructions and tips from here: http://stackoverflow.com/questions/14829190/how-to-use-markdown-for-maven-project-site
You can add also PlantUML plugin into pom and transform your PlantUML drawings into PNG and written into site’s output directory.
However if you want to get the site built during the normal phases instead running mvn site — and for example package the site into a web application, you need to command both PlantUML and site plugins to run during the compile phase. Executions tag is just the perfect way to do that.
PlantUML plugin can be run with the following configuration added to plugin configuration.
And site plugin can be run with following:
Configuration can be added to direct output to a specific places:
In the above case we are directing the output to a web application’s directory to be packaged into the application. This way we are able to build and package a web application in singe stroke — and include also related documentation with it.
How cool is that.