Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should project documentation be stored in a typical maven project [closed]

People also ask

What is used by Maven to store project details?

Maven dynamically downloads Java libraries and Maven plug-ins from one or more repositories such as the Maven 2 Central Repository, and stores them in a local cache. This local cache of downloaded artifacts can also be updated with artifacts created by local projects.

What is the use of target folder in Maven?

The target directory is used to house all output of the build. The src directory contains all of the source material for building the project, its site and so on. It contains a subdirectory for each type: main for the main build artifact, test for the unit test code and resources, site and so on.

What is .mvn folder?

The . mvn directory is a directory where you can put some Maven configuration files. One of these Maven configuration files is the jvm. config file which can be used to configure the Java VM that is used by Maven to build your project. Some of the settings you can set in this file are the Maven memory limits.


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.


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
[..]

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.