Where should project documentation be stored in a typical maven project [closed]
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.
Solution 1:
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:
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:
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 thedocfilessubdirs
parameter to copy these.