Maven JavaDoc: the required class is missing

I run Maven 3.0 and emptied my repository and then rebuilt the repository. When I use "mvn clean install", I get a successful build but have not created JavaDocs. But when I use "mvn javadoc: aggregate", I get this error. I downloaded Maven Reporting (3.0) and still get this error even after adding reports depending. I tried to delete the configuration and version section as suggested by another question / answer, but still have the same problem.

'Unable to load mojo' javadoc 'into plugin' org.apache.maven-javadoc-plugin-2.8 'Invalid class: org / apache / maven / reporting / MavenReport

BTW, is there an easy way to get a properly formatted XML file in a code block?

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>groupid</groupId> <artifactId>D</artifactId> <version>1.0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>D</name> <description>Parent POM XML File</description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <profiles> <profile> <activation> <jdk>[1.3,1.6)</jdk> </activation> </profile> </profiles> <modules> <module>One</module> <module>Two</module> <module>Three</module> <module>Four</module> <module>Five</module> <module>Six</module> <module>Seven</module> <module>Eight</module> <module>Nine</module> <module>Ten</module> <module>Eleven</module> <module>Twelve</module> <module>Thirteen</module> </modules> <dependencies> <dependency> <groupId>org.apache.abdera</groupId> <artifactId>abdera-bundle</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.16</version> <type>jar</type> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <type>jar</type> <optional>false</optional> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> <version>1.1.5.1</version> </dependency> <dependency> <groupId>commonj</groupId> <artifactId>commonj</artifactId> <version>1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.8</version> </dependency> <dependency> <groupId>org.apache.maven.reporting</groupId> <artifactId>maven-reporting-api</artifactId> <version>3.0</version> </dependency> </dependencies> <build> <finalName>D</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.8</version> <configuration> <outputDirectory>${project.build.directory}/javadoc</outputDirectory> <reportOutputDirectory>${project.reporting.outputDirectory}/javadoc</reportOutputDirectory> <version>2.8</version> </configuration> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>aggregate</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> 
+4
source share
2 answers

I had this problem a few days ago: It was caused by a broken JAR message (I think on my side it was caused by one of these crazy DNS servers, some providers provide where each request ends on a dummy HTML page sent to the client )

Removing the maven message plugin from the local M2 cache and allowing Maven to load it again solved the problem for me.

+4
source

Removing the full local .m2 repository solved my problem.

Or, you need to know which plugins you are using exactly with their dependencies, as one of the plugins was having problems loading.

In this case, reporting and removing the assembly plugin should do the trick.

0
source

All Articles