1

我刚刚下载了activemq-parent-5.9.0-source-release.zip,解压并运行:- mvn clean install,如http://activemq.apache.org/getting-started.html#GettingStarted-WindowsSourceInstallation

但是我发现了以下错误:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21:58.974s
[INFO] Finished at: Mon Oct 28 22:41:27 EST 2013
[INFO] Final Memory: 94M/224M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.0:s
hade (default) on project activemq-all: Execution default of goal org.apache.mav
en.plugins:maven-shade-plugin:2.0:shade failed: A required class was missing whi
le executing org.apache.maven.plugins:maven-shade-plugin:2.0:shade: org/sonatype
/aether/version/VersionConstraint
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-shade-plugin:2.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Anderson/.m2/repository/org/apache/maven/plugin
s/maven-shade-plugin/2.0/maven-shade-plugin-2.0.jar
[ERROR] urls[1] = file:/C:/Users/Anderson/.m2/repository/org/sonatype/sisu/sisu-
inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[2] = file:/C:/Users/Anderson/.m2/repository/org/sonatype/sisu/sisu-
guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[3] = file:/C:/Users/Anderson/.m2/repository/org/sonatype/aether/aet
her-util/1.7/aether-util-1.7.jar
[ERROR] urls[4] = file:/C:/Users/Anderson/.m2/repository/org/codehaus/plexus/ple
xus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[5] = file:/C:/Users/Anderson/.m2/repository/org/codehaus/plexus/ple
xus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[6] = file:/C:/Users/Anderson/.m2/repository/org/sonatype/plexus/ple
xus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[7] = file:/C:/Users/Anderson/.m2/repository/org/sonatype/plexus/ple
xus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[8] = file:/C:/Users/Anderson/.m2/repository/junit/junit/3.8.1/junit
-3.8.1.jar
[ERROR] urls[9] = file:/C:/Users/Anderson/.m2/repository/org/codehaus/plexus/ple
xus-utils/3.0.1/plexus-utils-3.0.1.jar
[ERROR] urls[10] = file:/C:/Users/Anderson/.m2/repository/asm/asm/3.3.1/asm-3.3.
1.jar
[ERROR] urls[11] = file:/C:/Users/Anderson/.m2/repository/asm/asm-commons/3.3.1/
asm-commons-3.3.1.jar
[ERROR] urls[12] = file:/C:/Users/Anderson/.m2/repository/asm/asm-tree/3.3.1/asm
-tree-3.3.1.jar
[ERROR] urls[13] = file:/C:/Users/Anderson/.m2/repository/org/jdom/jdom/1.1/jdom
-1.1.jar
[ERROR] urls[14] = file:/C:/Users/Anderson/.m2/repository/org/apache/maven/share
d/maven-dependency-tree/2.0/maven-dependency-tree-2.0.jar
[ERROR] urls[15] = file:/C:/Users/Anderson/.m2/repository/backport-util-concurre
nt/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[16] = file:/C:/Users/Anderson/.m2/repository/org/vafer/jdependency/
0.7/jdependency-0.7.jar
[ERROR] urls[17] = file:/C:/Users/Anderson/.m2/repository/commons-io/commons-io/
1.3.2/commons-io-1.3.2.jar
[ERROR] urls[18] = file:/C:/Users/Anderson/.m2/repository/asm/asm-analysis/3.2/a
sm-analysis-3.2.jar

我有 Windows 7 和 Maven 3.1.1。

谁能帮我?谢谢你。

4

2 回答 2

2

我认为这是 maven-shade-plugin 中的一个已知问题。在此处检查问题:http: //jira.codehaus.org/browse/MSHADE-143

从 2.0 升级到 2.1 应该可以解决这个问题。

另见:https ://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound

于 2013-10-28T12:16:48.833 回答
0

我知道这是不久前的,并且接受的答案与此答案相同,但是对于那些想要快速修复解决方案的人来说,如果您将from更改为<maven-shade-plugin-version>2.0</maven-shade-plugin-version>,它将构建而不会出现任何错误。我也曾作为 CLI 争论。pom.xml2.02.1-DskipTests=true

于 2014-03-04T17:28:52.357 回答