Got documentation as markdown and PlantUMl in maven project?

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.

<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>

 

And site plugin can be run with following:

<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>

Configuration can be added to direct output to a specific places:

<configuration>
<outputDirectory>${project.basedir}/target/war-docs-1.0/</outputDirectory>
</configuration>

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.

This entry was posted in programming, technology. Bookmark the permalink.

Vastaa

Täytä tietosi alle tai klikkaa kuvaketta kirjautuaksesi sisään:

WordPress.com-logo

Olet kommentoimassa WordPress.com -tilin nimissä. Log Out / Muuta )

Twitter-kuva

Olet kommentoimassa Twitter -tilin nimissä. Log Out / Muuta )

Facebook-kuva

Olet kommentoimassa Facebook -tilin nimissä. Log Out / Muuta )

Google+ photo

Olet kommentoimassa Google+ -tilin nimissä. Log Out / Muuta )

Muodostetaan yhteyttä palveluun %s