bulid cloudstack4.3 rpm–error – error in opening zip file | 张恒镭的博客

bulid cloudstack4.3 rpm–error – error in opening zip file

时间:14-07-01 栏目:cloudstack 作者:恒镭, 张 评论:0 点击: 2,963 次

今天编译cloudstack rpm包的时候 遇到如下pom依赖错误。
[root@localhost centos63]# ./package.sh 
。。。。。。。。。。。。。。。。。。。。。此处省略
I faced some POMs problem in the build of cloud-awsapi

[INFO] Apache CloudStack AWS API Bridge .................. FAILURE [1.488s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:19.165s
[INFO] Finished at: Fri Sep 13 06:31:34 JST 2013
[INFO] Final Memory: 53M/416M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
(default-compile) on project cloud-awsapi: Compilation failure:
Compilation failure:
[ERROR] error: error reading
/root/.m2/repository/org/apache/axis2/mex/1.5.4/mex-1.5.4-impl.jar;
error in opening zip file
[ERROR] error: error reading
/root/.m2/repository/org/apache/axis2/axis2-mtompolicy/1.5.4/axis2-mtompolicy-1.5.4.jar;
error in opening zip file
[ERROR] error: error reading
/root/.m2/repository/org/apache/ws/commons/axiom/axiom-dom/1.2.10/axiom-dom-1.2.10.jar;
error in opening zip file
[ERROR] error: error reading
/root/.m2/repository/org/opensaml/opensaml1/1.1/opensaml1-1.1.jar;
error in opening zip file
[ERROR] error: error reading
/root/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar;
error in opening zip file
[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/MojoFailureException

[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :cloud-awsapi
error: Bad exit status from /var/tmp/rpm-tmp.uKNLdw (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.uKNLdw (%build)


I 've Corrected it by removing the older depedencies and downloading
new ones into ./m2/repository:


# cd /root/.m2/repository/org/apache/axis2/mex/1.5.4/
# mv mex-1.5.4-impl.jar mex-1.5.4-impl.jar.html
# wget http://mirrors.ibiblio.org/maven2/org/apache/axis2/mex/1.5.4/mex-1.5.4-impl.jar
# file mex-1.5.4-impl.jar
mex-1.5.4-impl.jar: Zip archive data, at least v1.0 to extract

# cd /root/.m2/repository/org/apache/axis2/axis2-mtompolicy/1.5.4/
# mv axis2-mtompolicy-1.5.4.jar axis2-mtompolicy-1.5.4.jar.html
# wget http://mirrors.ibiblio.org/maven2/org/apache/axis2/axis2-mtompolicy/1.5.4/axis2-mtompolicy-1.5.4.jar
# file axis2-mtompolicy-1.5.4.jar
axis2-mtompolicy-1.5.4.jar: Zip archive data, at least v1.0 to extract

# cd /root/.m2/repository/org/apache/ws/commons/axiom/axiom-dom/1.2.10/
# mv axiom-dom-1.2.10.jar axiom-dom-1.2.10.jar.html
# wget http://mirrors.ibiblio.org/maven2/org/apache/ws/commons/axiom/axiom-dom/1.2.10/axiom-dom-1.2.10.jar

# cd /root/.m2/repository/org/opensaml/opensaml1/1.1/
# mv opensaml1-1.1.jar opensaml1-1.1.jar.html
# wget http://mirrors.ibiblio.org/maven2/org/opensaml/opensaml1/1.1/opensaml1-1.1.jar

# cd /root/.m2/repository/commons-lang/commons-lang/2.3/
# mv commons-lang-2.3.jar commons-lang-2.3.jar.html
# wget http://mirrors.ibiblio.org/maven2/commons-lang/commons-lang/2.3/commons-lang-2.3.jar

# cd /root/.m2/repository/bouncycastle/bcprov-jdk14/140/
# mv 140/bcprov-jdk14-140.jar bcprov-jdk14-140.jar.html
# wget http://repo1.maven.org/maven2/bouncycastle/bcprov-jdk14/140/bcprov-jdk14-140.jar


After that , RPMs are builded and the are ready for yum repository

 

image

 

报的是 error in openning zip file

 

 

我用file 看了下

file axis2-mtompolicy-1.5.4.jar
axis2-mtompolicy-1.5.4.jar: UTF-8 Unicode HTML document text, with very long lines, with CRLF, LF line terminators

果然不是zip格式 是html 格式 看来是pom下载jar包错误,自己用上面的命令手动下载jar 重新编译即可。

声明: 本文由( 恒镭, 张 )原创编译,转载请保留链接: bulid cloudstack4.3 rpm–error – error in opening zip file

bulid cloudstack4.3 rpm–error – error in opening zip file:等您坐沙发呢!

发表评论




------====== 本站公告 ======------
欢迎关注我的博客。

其他