2

当试图做一个 mvn 站点时:运行这个项目:

<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

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

4

1 回答 1

2

我认为您想改用maven-changes-plugin

于 2013-08-21T11:55:34.103 回答