2

I inherited a project that is supposed to build javadoc files and place them in the site directory. This is not being done. I have looked at all the examples I can find and I can't figure out where the configuration is broken.

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.0</version>
            <executions>
                <execution>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>site</goal>
                    </goals>
                    <configuration>
                        <reportPlugins>
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-javadoc-plugin</artifactId>
                                <version>2.8</version>
                            </plugin>
                        </reportPlugins>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Any and all help is greatly appreciated.

Adam Lear
  • 38,111
  • 12
  • 81
  • 101

1 Answers1

2

You have bound maven site plugin's site goal to prepare-package phase. You have configured javadoc generation in this plugin configuration.

As such, if you run maven's default lifecycle goals like mvn package or mvn install you should get site report with javadocs.

If you ran mvn site, it would skip prepare-package phase to which your plugin configuration is bound and hence would not generate javadoc.

Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • The prepare-package is not skipped in case of mvn site it is simply not part of the life-cycle (http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html). – khmarbaise Jun 08 '12 at 16:54