Where should project documentation be stored in a typical maven project

MavenDocumentation

Maven Problem Overview


Where should should project documentation (requirements, etc.) be stored in a typical maven project.

None of the directories listed in Introduction to the Standard Directory Layout page is an obvious candidate.

Maven Solutions


Solution 1 - Maven

Unfortunately there is no convention. If you want the documentation to be part of the generated site, obviously /src/site is a good place. Maybe you can even write the documentation in the APT format?

But more likely you have a set of doc, pdf and xls files, graphics, e-mails, etc. You can either place them under /src/site as well and put hyperlinks in the site or... define your own convention, sadly. Typically I have seen /src/main/doc(s), /src/doc(s) or even /doc(s).

You don't want to place your documentation in /src/main/resources or src/main/webapp, as the files will then be part of built artifact (JAR/WAR) which is rarely desired.

Solution 2 - Maven

http://www.sonatype.com/books/mvnref-book/reference/site-generation-sect-dir-struct.html recommends the following structure

sample-project
+- src/
[..]
+- resources/
|  +- images/
|  |  +- banner-left.png
|  |  +- banner-right.png
|  |
|  +- architecture.html
|  +- jira-roadmap-export-2007-03-26.html
[..]

Solution 3 - Maven

According to the maven-javadoc-plugin:

> The <javadocDirectory/> parameter can be used to include additional resources, like HTML or images, in the generated javadoc. You can then link to these resources in your javadoc comments. By default, all javadoc resources are in ${basedir}/src/main/javadoc directory. Note that you need to set the docfilessubdirs parameter to copy these.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser63904View Question on Stackoverflow
Solution 1 - MavenTomasz NurkiewiczView Answer on Stackoverflow
Solution 2 - Mavenrob2universeView Answer on Stackoverflow
Solution 3 - MavenAlunView Answer on Stackoverflow