我正在使用 Maven 3.2.3 和 Java 6 (1.6.45)。我想将 FindBugs 插件合并到我的站点报告中。所以我把这个添加到我的 pom 中……</p>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
但是,当我跑步时
mvn site:site site:deploy
我得到以下异常......</p>
[INFO] Generating "FindBugs" report --- findbugs-maven-plugin:3.0.0
[INFO] Locale is en
[INFO] Fork Value is true
[java] Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/umd/cs/findbugs/FindBugs2 : Unsupported major.minor version 51.0
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
[java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[INFO] ------------------------------------------------------------------------
知道我还需要包括什么来解决这个问题吗?谢谢, - 戴夫