Using the FAQ Plug-in

Many projects contain pages full of frequently asked questions, which provide insight to everything from the reason why a particular project was started to how one can fix common technical problems. The Maven FAQ plug-in is a useful tool for creating such a page.

How do I do that?

To use the FAQ plug-in, list the plug-in in your project.xml reports element as follows:

<reports>
  <report>maven-faq-plugin</report>
</reports>

Now that you have the report activated, create the xdocs/faq.fml file with the following content:

Note

The reports element is not additive. If you specify only one report in this element, only one report is generated. You'll need to list all the reports you want explicitly in the reports element.

<?xml version="1.0" encoding="UTF-8"?> <faqs title="Frequently Asked Questions"> <part id="general"> <title>General</title> <faq id="whats-weather"> <question> What is the Weather project? </question> <answer> <p> The Weather project is an example from the Maven Developer's Notebook. It is an attempt to demonstrate simple Maven customization techniques with a project that isn't going to bore the reader to death. </p> </answer> </faq> <faq id="why-axis"> <question> Why did you choose the Axis plug-in? </question> <answer> <p> The Axis plug-in was selected because it happens to be a useful and complex tool that is easy to introduce. </p> </answer> </faq> </part> <part id="install"> <title>Installation</title> <faq id="how-install"> <question> How do I install ...

Get Maven: A Developer's Notebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.