From Fedora Project Wiki

Line 24: Line 24:
</pre>
</pre>


Solution is pretty simple: use '''javadoc:aggregate''' instead
Solution is pretty simple: use '''javadoc:aggregate''' instead. Another advantage of this approach is that you will not have to merge javadocs for all modules manually. Merged javadoc will be created in <code>target/site/apidocs</code> in top-level project

Revision as of 14:46, 2 August 2010

Packaging Maven in Fedora can be quite frustrating experience, especially in the beginning. I'll try to collect common error messages and fixes that will show you how to workaround these problems

Basic issues with dependencies

Compilation failures

Test failures

Misc

javadoc:javadoc issue

You can encounter this bug when trying to create javadocs for multi-module maven projects:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-javadoc-plugin:2.7:javadoc': Unable to load the mojo 'org.apache.maven.plugins:maven-javadoc-plugin:2.7:javadoc' in the plugin 'org.apache.maven.plugins:maven-javadoc-plugin'. A required class is missing: org/apache/maven/shared/invoker/MavenInvocationException
org.apache.maven.shared.invoker.MavenInvocationException
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-javadoc-plugin:2.7:javadoc': Unable to load the mojo 'org.apache.maven.plugins:maven-javadoc-plugin:2.7:javadoc' in the plugin 'org.apache.maven.plugins:maven-javadoc-plugin'. A required class is missing: org/apache/maven/shared/invoker/MavenInvocationException
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:698)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)

Solution is pretty simple: use javadoc:aggregate instead. Another advantage of this approach is that you will not have to merge javadocs for all modules manually. Merged javadoc will be created in target/site/apidocs in top-level project