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.
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.
发布评论
评论(3)
不幸的是没有约定。如果您希望文档成为生成站点的一部分,显然
/src/site
是一个好地方。也许您甚至可以以 APT 格式编写文档?但更有可能的是,您有一组
doc
、pdf
和xls
文件、图形、电子邮件等。您可以将它们放在/src/site
以及在网站中放置超链接或...定义您自己的约定,遗憾的是。通常我见过/src/main/doc(s)
、/src/doc(s)
甚至/doc(s)
。您不想将文档放在
/src/main/resources
或src/main/webapp
中,因为这些文件将成为构建工件(JAR/ WAR),这是很少需要的。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
andxls
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
orsrc/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
推荐以下结构
http://www.sonatype.com/books/mvnref-book/reference/site-generation-sect-dir-struct.html
recommends the following structure
根据 maven-javadoc-plugin:
According to the maven-javadoc-plugin: