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>
source share