Maven 2.x Javadoc Plugin

CLONE -If Javadoc is set to aggregate, the build fails inside a Maven plugin module

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Not A Bug
  • Affects Version/s: 2.3
  • Fix Version/s: 2.4
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

If your project contains a Maven plugin, then it is impossible to build aggregated Javadoc.

As the output (attached) shows, Maven seems to recusively build (what's with all those "skipping" messages?). When it reaches the plugin:

[INFO] Error during page generation

Embedded error: Error rendering Maven report: Error extracting plugin descriptor: 'Goal: component-report already exists in the plugin descriptor for prefix: tapestry-component-report
Existing implementation is: org.apache.tapestry.mojo.ComponentReport
Conflicting implementation is: org.apache.tapestry.mojo.ComponentReport'

I can get by this with the -fn (fail never) option.

Issue Links

Activity

Hide
Christian Schulte added a comment -

Having

<reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.5</version>
        <reportSets>
          <reportSet>
            <id>javadoc</id>
            <inherited>true</inherited>
            <reports>
              <report>javadoc</report>
            </reports>
            <configuration>
              <aggregate>false</aggregate>
              <author>true</author>
              <charset>UTF-8</charset>
              <docencoding>UTF-8</docencoding>
              <encoding>UTF-8</encoding>
              <keywords>true</keywords>
              <doctitle>${pom.name} Specification ${pom.version}</doctitle>
              <linksource>true</linksource>
              <nodeprecated>true</nodeprecated>
              <quiet>false</quiet>
              <verbose>false</verbose>
              <serialwarn>true</serialwarn>
              <windowtitle>${pom.name} Specification ${pom.version}</windowtitle>
              <overview>${basedir}/src/main/javadoc/overview.html</overview>
              <show>public</show>
              <links>
                <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
              </links>
            </configuration>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
            <configuration>
              <aggregate>true</aggregate>
              <breakiterator>true</breakiterator>
              <charset>UTF-8</charset>
              <docencoding>UTF-8</docencoding>
              <encoding>UTF-8</encoding>
              <keywords>false</keywords>
              <linksource>true</linksource>
              <serialwarn>true</serialwarn>
              <show>private</show>
              <doctitle>${pom.name} Specification ${pom.version}</doctitle>
              <windowtitle>${pom.name} Specification ${pom.version}</windowtitle>
            </configuration>
          </reportSet>
        </reportSets>
      </plugin>

in a parent pom from a multi-module project containing a mojo artifact defined like

* @goal java-resources
 * @phase generate-sources
 * @requiresDependencyResolution compile

still produces a similar stacktrace for me

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error extracting plugin descriptor: 'Goal: java-resources already exists in the plugin descriptor for prefix: some-prefix
Existing implementation is: some.package.JavaResourcesMojo
Conflicting implementation is: some.package.JavaResourcesMojo'
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:924)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:767)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:549)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error extracting plugin descriptor: 'Goal: java-resources already exists in the plugin descriptor for prefix: some-prefix
Existing implementation is: some.package.JavaResourcesMojo
Conflicting implementation is: some.package.JavaResourcesMojo'
        at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:158)
        at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:63)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        ... 20 more
Caused by: org.apache.maven.plugin.descriptor.DuplicateMojoDescriptorException: Goal: java-resources already exists in the plugin descriptor for prefix: some-prefix
Existing implementation is: some.package.JavaResourcesMojo
Conflicting implementation is: some.package.JavaResourcesMojo
        at org.apache.maven.plugin.descriptor.PluginDescriptor.addMojo(PluginDescriptor.java:103)
        at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:110)
        at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:146)
        ... 23 more

when executing

mvn site:stage -DstagingDirectory=/tmp/staging -e
Show
Christian Schulte added a comment - Having
<reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.5</version>
        <reportSets>
          <reportSet>
            <id>javadoc</id>
            <inherited>true</inherited>
            <reports>
              <report>javadoc</report>
            </reports>
            <configuration>
              <aggregate>false</aggregate>
              <author>true</author>
              <charset>UTF-8</charset>
              <docencoding>UTF-8</docencoding>
              <encoding>UTF-8</encoding>
              <keywords>true</keywords>
              <doctitle>${pom.name} Specification ${pom.version}</doctitle>
              <linksource>true</linksource>
              <nodeprecated>true</nodeprecated>
              <quiet>false</quiet>
              <verbose>false</verbose>
              <serialwarn>true</serialwarn>
              <windowtitle>${pom.name} Specification ${pom.version}</windowtitle>
              <overview>${basedir}/src/main/javadoc/overview.html</overview>
              <show>public</show>
              <links>
                <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
              </links>
            </configuration>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
            <configuration>
              <aggregate>true</aggregate>
              <breakiterator>true</breakiterator>
              <charset>UTF-8</charset>
              <docencoding>UTF-8</docencoding>
              <encoding>UTF-8</encoding>
              <keywords>false</keywords>
              <linksource>true</linksource>
              <serialwarn>true</serialwarn>
              <show>private</show>
              <doctitle>${pom.name} Specification ${pom.version}</doctitle>
              <windowtitle>${pom.name} Specification ${pom.version}</windowtitle>
            </configuration>
          </reportSet>
        </reportSets>
      </plugin>
in a parent pom from a multi-module project containing a mojo artifact defined like
* @goal java-resources
 * @phase generate-sources
 * @requiresDependencyResolution compile
still produces a similar stacktrace for me
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error extracting plugin descriptor: 'Goal: java-resources already exists in the plugin descriptor for prefix: some-prefix
Existing implementation is: some.package.JavaResourcesMojo
Conflicting implementation is: some.package.JavaResourcesMojo'
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:924)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:767)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:549)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error extracting plugin descriptor: 'Goal: java-resources already exists in the plugin descriptor for prefix: some-prefix
Existing implementation is: some.package.JavaResourcesMojo
Conflicting implementation is: some.package.JavaResourcesMojo'
        at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:158)
        at org.apache.maven.plugin.plugin.HelpGeneratorMojo.execute(HelpGeneratorMojo.java:63)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        ... 20 more
Caused by: org.apache.maven.plugin.descriptor.DuplicateMojoDescriptorException: Goal: java-resources already exists in the plugin descriptor for prefix: some-prefix
Existing implementation is: some.package.JavaResourcesMojo
Conflicting implementation is: some.package.JavaResourcesMojo
        at org.apache.maven.plugin.descriptor.PluginDescriptor.addMojo(PluginDescriptor.java:103)
        at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:110)
        at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:146)
        ... 23 more
when executing
mvn site:stage -DstagingDirectory=/tmp/staging -e
Hide
Vincent Siveton added a comment -

It seems to not be a bug into the javadoc plugin but I guess that you defined 2 mojos with same goal...

Show
Vincent Siveton added a comment - It seems to not be a bug into the javadoc plugin but I guess that you defined 2 mojos with same goal...
Hide
rt15 added a comment -

Taking exactly the same issue...

(Project with multiple modules and a plugin, agregate with javadoc in version 2.5 -> goal already exists)

Maybe more info later.

Show
rt15 added a comment - Taking exactly the same issue... (Project with multiple modules and a plugin, agregate with javadoc in version 2.5 -> goal already exists) Maybe more info later.
Hide
rt15 added a comment -

org.apache.maven.plugins:maven-javadoc-plugin:2.5:aggregate
-> error

org.apache.maven.plugins:maven-javadoc-plugin:2.2:javadoc
-> works fine

Other topics on the subject :
http://mail-archives.apache.org/mod_mbox/maven-doxia-dev/200709.mbox/%3C46E37CCE.5080202@apache.org%3E
http://jira.codehaus.org/browse/MJAVADOC-145
http://www.nabble.com/%22Goal:-clean-already-exists-in-the-plugin-descriptor-for-prefix:-...%22-td23127658.html

Show
rt15 added a comment - org.apache.maven.plugins:maven-javadoc-plugin:2.5:aggregate -> error org.apache.maven.plugins:maven-javadoc-plugin:2.2:javadoc -> works fine Other topics on the subject : http://mail-archives.apache.org/mod_mbox/maven-doxia-dev/200709.mbox/%3C46E37CCE.5080202@apache.org%3E http://jira.codehaus.org/browse/MJAVADOC-145 http://www.nabble.com/%22Goal:-clean-already-exists-in-the-plugin-descriptor-for-prefix:-...%22-td23127658.html
Hide
jcrouvi added a comment -

I experience the same phenomenon with <artifactId>maven-javadoc-plugin</artifactId> <version>2.6</version> and I haven't set the 'agregate' property (default is false).
If I go back to <version>2.2</version> everything is alright.

Here a part of the file pom.xml:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
<configuration>
<quiet>true</quiet>
<show>protected</show>
<links>
<link>http://java.sun.com/javase/6/docs/api/</link>
<link>http://java.sun.com/javaee/5/docs/api/</link>
</links>
</configuration>
</plugin>

Show
jcrouvi added a comment - I experience the same phenomenon with <artifactId>maven-javadoc-plugin</artifactId> <version>2.6</version> and I haven't set the 'agregate' property (default is false). If I go back to <version>2.2</version> everything is alright. Here a part of the file pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.2</version> <configuration> <quiet>true</quiet> <show>protected</show> <links> <link>http://java.sun.com/javase/6/docs/api/</link> <link>http://java.sun.com/javaee/5/docs/api/</link> </links> </configuration> </plugin>
Hide
jcrouvi added a comment -

According to the comment above (jcrouvi added a comment - 24/Aug/09 06:18 AM) this bug should be reopened.

Show
jcrouvi added a comment - According to the comment above (jcrouvi added a comment - 24/Aug/09 06:18 AM) this bug should be reopened.
Hide
Toni Menzel added a comment -

+1 for re-opening this. We have failed site + releasebuilds when using maven-javadoc-plugin 2.4 + 2.5 in combination with mojos.
Going back to 2.2 is a (temporary) solution.

Show
Toni Menzel added a comment - +1 for re-opening this. We have failed site + releasebuilds when using maven-javadoc-plugin 2.4 + 2.5 in combination with mojos. Going back to 2.2 is a (temporary) solution.
Hide
Ceki Gulcu added a comment - - edited

An open source project of ours uses aggregated javadocs. See [1]. Moving to maven-javadoc-plugin 2.2 solved it for us.

[1] http://cal10n.qos.ch/

Show
Ceki Gulcu added a comment - - edited An open source project of ours uses aggregated javadocs. See [1]. Moving to maven-javadoc-plugin 2.2 solved it for us. [1] http://cal10n.qos.ch/
Hide
jcrouvi added a comment -
Show
jcrouvi added a comment - Issue http://jira.codehaus.org/browse/MJAVADOC-257 added

People

Vote (0)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: