0

I have a maven project with submodules.

Is is it possible to run on the root pom:

mvn clean install javadoc:javadoc

And building all the project (submodules) but generating the javadoc only for one of the submodule ? Cause I'm only interesseted to publish the javadoc of one.

My pom.xml contains the maven-javadoc-plugin.

Thanks.

La Chamelle
  • 2,797
  • 3
  • 33
  • 54

1 Answers1

0

Configure the Javadoc plugin within the module you want to have the javadoc generated:

<build>
    <plugins>
        <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
                <execution>
                    <id>javadoc-jar</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                    <configuration>
                        [...]
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

This config will create the Javadoc each tome you call mvn package or mvn install

Benny Bottema
  • 9,605
  • 10
  • 59
  • 80
Jens Baitinger
  • 1,806
  • 11
  • 27