2 lpf 2nyy lpf_2nyy 于 2015.07.23 11:10 提问

Maven多渠道打包报错,求解!

这是异常:

D:\makeApk\MavenBuild>D:\makeApk\MavenBuild\build.bat
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mavenbuild-test 1.0.0
[INFO] ------------------------------------------------------------------------
Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: org/eclips
e/aether/spi/connector/Transfer$State
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.r
un(WagonRepositoryConnector.java:608)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn
ableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:724)
[INFO] ------------------------------------------------------------------------C
aused by: java.lang.ClassNotFoundException: org.eclipse.aether.spi.connector.Tra
nsfer$State

    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(

SelfFirstStrategy.java:50)[INFO] BUILD FAILURE

    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl

ass(ClassRealm.java:271)[INFO] -------------------------------------------------

    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm

.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:239)
... 5 more
[INFO] Total time: 2.117 s
[INFO] Finished at: 2015-07-23T11:06:57+08:00
[INFO] Final Memory: 14M/213M

[INFO] ------------------------------------------------------------------------

constituent[0]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-api-1.0.2.v20150114.
jar
constituent[1]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-connector-basic-1.0.
2.v20150114.jar
constituent[2]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-impl-1.0.2.v20150114
.jar
constituent[3]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-spi-1.0.2.v20150114.
jar
constituent[4]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-transport-wagon-1.0.
2.v20150114.jar
constituent[5]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-util-1.0.2.v20150114
.jar
constituent[6]: file:/D:/Soft/apache-maven-3.3.3/lib/aopalliance-1.0.jar
constituent[7]: file:/D:/Soft/apache-maven-3.3.3/lib/cdi-api-1.0.jar
constituent[8]: file:/D:/Soft/apache-maven-3.3.3/lib/commons-cli-1.2.jar
constituent[9]: file:/D:/Soft/apache-maven-3.3.3/lib/commons-io-2.2.jar
constituent[10]: file:/D:/Soft/apache-maven-3.3.3/lib/commons-lang-2.6.jar
constituent[11]: file:/D:/Soft/apache-maven-3.3.3/lib/guava-18.0.jar
constituent[12]: file:/D:/Soft/apache-maven-3.3.3/lib/javax.inject-1.jar
constituent[13]: file:/D:/Soft/apache-maven-3.3.3/lib/jsoup-1.7.2.jar
constituent[14]: file:/D:/Soft/apache-maven-3.3.3/lib/jsr250-api-1.0.jar
constituent[15]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-aether-provider-3.3.
3.jar
constituent[16]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-artifact-3.3.3.jar
constituent[17]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-builder-support-3.3.
3.jar
constituent[18]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-compat-3.3.3.jar
constituent[19]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-core-3.3.3.jar
constituent[20]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-embedder-3.3.3.jar
constituent[21]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-model-3.3.3.jar
constituent[22]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-model-builder-3.3.3.
jar
constituent[23]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-plugin-api-3.3.3.jar

constituent[24]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-repository-metadata-
3.3.3.jar
constituent[25]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-settings-3.3.3.jar
constituent[26]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-settings-builder-3.3
.3.jar
constituent[27]: file:/D:/Soft/apache-maven-3.3.3/lib/org.eclipse.sisu.inject-0.
3.0.jar
constituent[28]: file:/D:/Soft/apache-maven-3.3.3/lib/org.eclipse.sisu.plexus-0.
3.0.jar
constituent[29]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-cipher-1.7.jar
constituent[30]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-component-annotatio
ns-1.5.5.jar
constituent[31]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-interpolation-1.21.
jar
constituent[32]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-sec-dispatcher-1.3.
jar
constituent[33]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-utils-3.0.20.jar
constituent[34]: file:/D:/Soft/apache-maven-3.3.3/lib/sisu-guice-3.2.5-no_aop.ja
r
constituent[35]: file:/D:/Soft/apache-maven-3.3.3/lib/slf4j-api-1.7.5.jar
constituent[36]: file:/D:/Soft/apache-maven-3.3.3/lib/slf4j-simple-1.7.5.jar
constituent[37]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-file-2.9.jar
constituent[38]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-http-2.9-shaded.jar
constituent[39]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-http-shared-2.9.jar
constituent[40]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-provider-api-2.9.jar

constituent[41]: file:/D:/Soft/apache-maven-3.3.3/conf/logging/

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/aether/sp
i/connector/Transfer$State
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.r
un(WagonRepositoryConnector.java:608)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn
ableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: org.eclipse.aether.spi.connector.Tr
ansfer$State
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl
ass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm
.java:239)
... 5 more
系统找不到指定的路径。
子目录或文件 assets 已经存在。
'assets/common.properties'...
正在添加: META-INF/MANIFEST.MF
正在添加: META-INF/DREAMZON.SF
正在添加: META-INF/DREAMZON.RSA
正在签名: assets/common.properties
子目录或文件 assets 已经存在。
'assets/common.properties'...
正在添加: META-INF/MANIFEST.MF
正在添加: META-INF/DREAMZON.SF
正在添加: META-INF/DREAMZON.RSA
正在签名: assets/common.properties
子目录或文件 assets 已经存在。
'assets/common.properties'...
正在添加: META-INF/MANIFEST.MF
正在添加: META-INF/DREAMZON.SF
正在添加: META-INF/DREAMZON.RSA
正在签名: assets/common.properties

D:\makeApk>

这是pom.xml:

<?xml version="1.0" encoding="utf-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.example.mavenbuild
mavenbuild-test
1.0.0
apk

UTF-8



com.google.android
android
4.1.1.4
provided



src
${project.artifactId}



com.jayway.maven.plugins.android.generation2
android-maven-plugin
3.8.2
true





com.jayway.maven.plugins.android.generation2
android-maven-plugin


<!-- platform as api level (api level 16 = platform 4.1)-->
16


false





1个回答

CSDNXIAON
CSDNXIAON   2015.07.23 11:13

Android之Maven集成Ant多渠道打包
----------------------同志你好,我是CSDN问答机器人小N,奉组织之命为你提供参考答案,编程尚未成功,同志仍需努力!

Csdn user default icon
上传中...
上传图片
插入图片