简体   繁体   English

汇总文档的maven-javadoc-plugin目标目录

[英]maven-javadoc-plugin target-directory of aggregated docs

I have an issue concerning the target directory of aggregated javadocs. 我有一个关于聚合javadocs的目标目录的问题。

What I have is: 我所拥有的是:

A maven project containing several modules. 一个包含多个模块的Maven项目。 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

I can't get it done to make javadoc generate the documentation in the directory named "directory_to_contain_docs". 我无法完成使javadoc在名为“ directory_to_contain_docs”的目录中生成文档的工作。

This is what I tried: 这是我尝试的:

I call the generation with " mvn javadoc:aggregate ". 我称这一代为“ mvn javadoc:aggregate ”。 And this is a part of the pom.xml: 这是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>

The javadoc is always generated in {project}/target/site/apidocs , the generation creates the complete path given in destDir beneath that directory. javadoc总是在{project} / target / site / apidocs中生成,该生成会在该目录下的destDir中创建完整路径。 I am looking for a way to have the whole docs somewhere else. 我正在寻找一种将整个文档放在其他地方的方法。

Is there a chance to achieve that? 有机会实现这一目标吗?

Thanks, Ishiido 谢谢石ido

Don't know why I did not see it... The missing link is configuration/reportOutputDirectory . 不知道为什么我没有看到它。缺少的链接是configuration/reportOutputDirectory It specifies the directory where the documentation is generated. 它指定生成文档的目录。 It may be specified further by destDir . 可以由destDir进一步指定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM