Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating documentation with maven

I'm just in the middle of revisiting maven. Our team had a bad experience when we last looked at this, as it was during the period when maven was rearchitecting from 1.x to 2.x, so a lot of the dependencies we needed hadn't been moved across to the new repositories. However, I have the time to reconsider now.

I am interested in using maven and either LaTeX or DocBook for creating documentation, and I was wondering if anyone had any experiences to share, project/module structure, good plugins to use, etc...

Many thanks :-)

Edit:

Just to clarify, I was looking to write a technical article/book, and my desired artifact would probably be a PDF.

like image 226
toolkit Avatar asked Nov 05 '08 12:11

toolkit


People also ask

Does Maven generate documentation?

The most important reporting plugin is the Maven Plugin Plugin which will generate the documentation for each plugin goal based on the mojo annotations.

What is Javadoc in Maven?

The Javadoc Plugin uses the Javadoc tool to generate javadocs for the specified project. For more information about the standard Javadoc tool, please refer to Reference Guide. The Javadoc Plugin gets the parameter values that will be used from the plugin configuration specified in the pom.

What are the 3 build lifecycle of Maven?

There are three built-in build lifecycles: default, clean and site. The default lifecycle handles your project deployment, the clean lifecycle handles project cleaning, while the site lifecycle handles the creation of your project's web site.

Can Maven build python projects?

To build your maven project, navigate to the location of the Python project (my-python-module path), open the command line and run mvn clean install . You can see the artifacts resulted from the build process under the target folder generated inside your project.


2 Answers

DocBook is one of the many supported inputs to Doxia, the engine used to generate docs by maven. Refer here: http://maven.apache.org/doxia/modules/index.html

In fact, the Doxia site answers your exact question: http://maven.apache.org/doxia/book/index.html

like image 194
tunaranch Avatar answered Sep 21 '22 04:09

tunaranch


You can easily create a site (that contains documentation) with Maven using the mvn site command (i.e. using the plugin site).

This plugin creates technical reports (such as Javadoc, Unit tests reports, code coverage...) but can be also used to create a "real site". You have more details about that in this page.

Basically, you write your page using APT (Almost Plain Text which is quite simple to understand), or a XML-based format, Xdoc.

2 years ago, I create a complete user guide for one application I developed, using the XDoc format and the Site Maven plugin. Globally, it was quite easy to create!

I hope this will help you!

like image 23
Romain Linsolas Avatar answered Sep 18 '22 04:09

Romain Linsolas