java - 使用 Maven 站点插件时出错(AbstractMethodError)

标签 java maven maven-site-plugin

当尝试执行 mvn site:run 时:

<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>com.example</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>test</name>
<description>test</description>

<reporting>
    <plugins>
        <!-- Project Reports -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.7</version>
        </plugin>

        <!-- Change report -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>changes-maven-plugin</artifactId>
            <version>2.0-beta-1</version>
        </plugin>
    </plugins>
</reporting>

我收到以下错误:

    [INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-site-plugin:3.0:run (default-cli) @ test ---
2013-08-21 12:44:07.381:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.7
[INFO] configuring report plugin org.codehaus.mojo:changes-maven-plugin:2.0-beta-1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.477s
[INFO] Finished at: Wed Aug 21 12:44:08 CEST 2013
[INFO] Final Memory: 16M/179M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:run (default-cli) on project test: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.0:run failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-site-plugin:3.0:run: java.lang.AbstractMethodError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-site-plugin:3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/user/.m2/repository/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.jar
[ERROR] urls[1] = file:/home/user/.m2/repository/org/apache/maven/reporting/maven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
[ERROR] urls[2] = file:/home/user/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
...
[ERROR] urls[39] = file:/home/user/.m2/repository/commons-lang/commons-lang/2.5/commons-lang-2.5.jar
[ERROR] urls[40] = file:/home/user/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
2013-08-21 12:44:08.256:INFO::Shutdown hook executing
2013-08-21 12:44:08.257:INFO::Shutdown hook complete

无论 src/changes/中是否有任何内容,该错误仅在我添加 changes-maven-plugin 后发生。到目前为止,我无法弄清楚问题到底是什么。有人可以解释我在这里做错了什么吗?

最佳答案

我想你想使用 maven-changes-plugin相反。

关于java - 使用 Maven 站点插件时出错(AbstractMethodError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18355501/

相关文章:

java - 打印二维数组列表

java - 验证maven-jar-plugin中的manifest.mainClass

java - 使用 mavengenerate 生成 Web 应用程序

java - 作业问题的有效算法

java - 连接Access数据库时如何避免 "Out Of Memory"错误?

java - 易变和同步

java - 如何使用 VM 选项运行测试单元

java - maven-site-plugin:配置哪个页面应该是index.html

java - 如何获取/发布多模块 Maven 项目站点到文件夹中

maven - 使用 Maven 构建站点 zip