Hi. I have project whose structure is the following:
A (packaging: pom)
A-core (packaging jar)
A-maven-plugin (packaging maven-plugin)
pom.xml from A has this:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>aggregate</goal>
</goals>
<configuration>
<links>
<link>http://www.testng.org/javadocs/</link>
<link>http://www.dbunit.org/apidocs/</link>
<link>http://java.sun.com/javaee/6/docs/api/</link>
</links>
<show>private</show>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Now when I invoke 'mvn clean package' I get this output:
$ mvn -v
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_19
...
$ mvn -Dmaven.test.skip -Dquiet=true package
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] A
[INFO] A Core
[INFO] A Maven Plugin
[INFO]
------------------------------------------------------------------------
[INFO] Building A
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] Preparing javadoc:aggregate
[INFO]
------------------------------------------------------------------------
[INFO] Building A
[INFO]
------------------------------------------------------------------------
[WARNING] Removing: aggregate from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO]
------------------------------------------------------------------------
[INFO] Building A Core
[INFO]
------------------------------------------------------------------------
[WARNING] Removing: aggregate from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO]
------------------------------------------------------------------------
[INFO] Building A Maven Plugin
[INFO]
------------------------------------------------------------------------
[WARNING] Removing: aggregate from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO] [javadoc:aggregate {execution: default}]
[INFO]
------------------------------------------------------------------------
[INFO] Building A Core
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 58 source files to
C:\users\SR\Workspace\A\ACore\target\classes
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Copying 16 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Not compiling test sources
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar:
C:\users\SR\Workspace\A\ACore\target\a-core-0.9-SNAPSHOT.jar
[INFO] Preparing javadoc:aggregate
[INFO]
------------------------------------------------------------------------
[INFO] Building A
[INFO]
------------------------------------------------------------------------
[WARNING] Removing: aggregate from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO]
------------------------------------------------------------------------
[INFO] Building A Core
[INFO]
------------------------------------------------------------------------
[WARNING] Removing: aggregate from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO]
------------------------------------------------------------------------
[INFO] Building A Maven Plugin
[INFO]
------------------------------------------------------------------------
[WARNING] Removing: aggregate from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO] [javadoc:aggregate {execution: default}]
[INFO]
------------------------------------------------------------------------
[INFO] Building A Maven Plugin
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [plugin:descriptor {execution: default-descriptor}]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 2 mojo descriptors.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error extracting plugin descriptor: 'Goal: generate already exists in
the plugin descriptor for prefix: generate
Existing implementation is: com.a.mojo.AGenerateMojo
Conflicting implementation is: com.a.mojo.AGenerateMojo'
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Wed Apr 28 14:19:11 CEST 2010
[INFO] Final Memory: 28M/68M
[INFO]
------------------------------------------------------------------------
I don't know why so many times the same projects are built and skipped.
Also, there is a build error. However, when I change the packaging type in
A-maven-plugin from 'maven-plugin' to 'jar', it builds fine and the
aggregated javadoc is created.
Is this a bug or something on my part? I don't want to run 'site' or
anything, I simply want an aggregated javadoc.
Regards,
wujek
--
View this message in context:
http://old.nabble.com/maven-javadoc-plugin%3Aaggregate-and-maven-plugin-module-does-not-work-tp28387753p28387753.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]