Site Directory Structure

Maven places all site document under src/site. Documents of similar format are placed in subdirectories of src/site. All Almost Plain Text (APT) documents should be in src/site/apt, all FAQ Markup Language (FML) documents should be in src/site/fml, and XDoc documents should be in src/site/xdoc. The site descriptor should be in src/site/site.xml, and all resources should be stored under src/site/resources. When the Maven Site plugin builds a web site, it will copy everything in the resources directory to the root of the site. If you store an image in src/site/resources/images/test.png, you would refer to the image from your site documentation using the relative path images/test.png.

The following example shows the location of all files in a project that contains APT, FML, HTML, XHTML, and some XDoc. Note that the XHTML content is simply stored in the resources/ directory. The architecture.html file will not be processed by Doxia; it will simply be copied to the output directory. You can use this approach if you want to include unprocessed HTML content and you don’t want to take advantage of the templating and formatting capabilities of Doxia and the Maven Site plugin:

sample-project +- src/ +- site/ +- apt/ | +- index.apt | +- about.apt | | | +- developer/ | +- embedding.apt | +- fml/ | +- faq.fml | +- resources/ | +- images/ | | +- banner-left.png | | +- banner-right.png | | | +- architecture.html | +- jira-roadmap-export-2007-03-26.html | +- xdoc/ | +- ...

Get Maven: The Definitive Guide 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.