简体   繁体   中英

maven-javadoc-plugin target-directory of aggregated docs

I have an issue concerning the target directory of aggregated javadocs.

What I have is:

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

I can't get it done to make javadoc generate the documentation in the directory named "directory_to_contain_docs".

This is what I tried:

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>

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?

Thanks, Ishiido

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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