汇总文档的maven-javadoc-plugin目标目录 [英] maven-javadoc-plugin target-directory of aggregated docs
问题描述
我有一个关于聚合javadocs的目标目录的问题.
I have an issue concerning the target directory of aggregated javadocs.
我所拥有的是:
一个包含多个模块的Maven项目.看起来有点像示例这里
A maven project containing several modules. It looks a bit like the one used as example here
Project
|-- directory_to_contain_docs/
|-- pom.xml
|-- Module1
| `-- pom.xml
|-- Module2
| `-- pom.xml
`-- Module3
`-- pom.xml
我无法完成使javadoc在名为"directory_to_contain_docs"的目录中生成文档的工作.
I can't get it done to make javadoc generate the documentation in the directory named "directory_to_contain_docs".
这是我尝试过的:
我用" mvn javadoc:aggregate "来称呼这一代.这是pom.xml的一部分:
I call the generation with "mvn javadoc:aggregate". And this is a part of the pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<!-- Default configuration for all reports -->
<failOnError>false</failOnError>
<destDir>${basedir}/directory_to_contain_docs</destDir>
<!-- as there are lots of incorrectly documented sources -->
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>aggregate</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>site</phase>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
javadoc总是在 {project}/target/site/apidocs 中生成,该生成会在该目录下的 destDir 中给定完整路径.我正在寻找一种将整个文档放在其他地方的方法.
The javadoc is always generated in {project}/target/site/apidocs, the generation creates the complete path given in destDir beneath that directory. I am looking for a way to have the whole docs somewhere else.
有机会实现这一目标吗?
Is there a chance to achieve that?
谢谢, 石井道
推荐答案
不知道为什么我没有看到它...缺少的链接是
configuration/reportOutputDirectory
.
它指定生成文档的目录.可以由destDir
进一步指定.
Don't know why I did not see it... The missing link is
configuration/reportOutputDirectory
.
It specifies the directory where the documentation is generated. It may be specified further by destDir
.
这篇关于汇总文档的maven-javadoc-plugin目标目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!