这是pom.xml中的javadoc插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<reportSets>
<reportSet>
<id>PDF</id>
<reports>
<report>javadoc</report>
</reports>
<configuration>
<name>PDF</name>
<description>MovieList documentation</description>
<destDir>pdf</destDir>
<doclet>com.tarsec.javadoc.pdfdoclet.PDFDoclet</doclet>
<docletPath>lib\pdfdoclet-1.0.3-all.jar</docletPath>
<useStandardDocletOptions>false</useStandardDocletOptions>
<additionalparam>
-pdf javadoc.pdf
</additionalparam>
</configuration>
</reportSet>
</reportSets>
</plugin>
<reportSets>
上有错误。
它说Invalid content was found starting with element 'reportSets'
。
我试图在PDFDoclet jar中使用它,但我无法让它运行起来。我做错了什么?
答案 0 :(得分:2)
我不确定,但可能你没有把plugin
放在适当的元素中。
这应该在<reporting>
元素中。它应该看起来像:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project ...>
...
<reporting>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<reportSets>
<reportSet>
<id>PDF</id>
<reports>
<report>javadoc</report>
</reports>
<configuration>
<name>PDF</name>
<description>MovieList documentation</description>
<destDir>pdf</destDir>
<doclet>com.tarsec.javadoc.pdfdoclet.PDFDoclet</doclet>
<docletPath>lib\pdfdoclet-1.0.3-all.jar</docletPath>
<useStandardDocletOptions>false</useStandardDocletOptions>
<additionalparam>
-pdf javadoc.pdf
</additionalparam>
</configuration>
</reportSet>
</reportSets>
</plugin>
</plugins>
...
</reporting>
...
</project>
如果您将此部分放在例如你得到的确切错误信息部分就像你得到的那样 - Invalid content was found starting with element 'reportSets'
答案 1 :(得分:1)