2012-11-28 59 views
0

我想修复vaadin openlayers附加组件中的一些错误。因此,为了构建源代码,我遵循在此链接http://code.google.com/p/vopenlayers/wiki/DevelopingAndBuilding中找到的步骤。但是,运行mvn install命令时出现此错误:构建vopenlayers时出错

[INFO] Building Unnamed - org.vaadin.vol:openlayers-wrapper:jar:1.2.1-SNAPSHOT 
[INFO] task-segment: [install] 
[INFO] ------------------------------------------------------------------------ 
[INFO] [resources:resources {execution: default-resources}] 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 146 resources 
[INFO] skip non existing resourceDirectory /home/fakher/Desktop/vopenlayers-read-only/src/main/resources 
[INFO] Copying 111 resources 
[INFO] [compiler:compile {execution: default-compile}] 
[INFO] Nothing to compile - all classes are up to date 
[INFO] [resources:testResources {execution: default-testResources}] 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/fakher/Desktop/vopenlayers-read-only/src/test/resources 
[INFO] [compiler:testCompile {execution: default-testCompile}] 
[INFO] Compiling 37 source files to /home/fakher/Desktop/vopenlayers-read-only/target/test-classes 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Compilation failure 

error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-continuation/7.2.2.v20101205/jetty-continuation-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-http/7.2.2.v20101205/jetty-http-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-io/7.2.2.v20101205/jetty-io-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-util/7.2.2.v20101205/jetty-util-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-webapp/7.2.2.v20101205/jetty-webapp-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-xml/7.2.2.v20101205/jetty-xml-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-servlets/7.2.2.v20101205/jetty-servlets-7.2.2.v20101205.jar; error in opening zip file 
error: error reading /root/.m2/repository/org/eclipse/jetty/jetty-client/7.2.2.v20101205/jetty-client-7.2.2.v20101205.jar; error in opening zip file 

谁能帮我解决这个问题?

PS:我使用Ubuntu 12.04 64位

回答

1

您确实需要使用root .m2目录下的文件夹。请不要使用它。这有助于避免安全/许可相关的麻烦。

我猜你正在用不同的用户配置文件进行mvn安装而不是根目录,而你的settings.xml正朝着root下的.m2指向。 maven进程试图通过zip文件提取一些依赖项,然后遇到File权限问题。

+0

不,我正在使用根配置文件。这就是为什么mvn会自动使用根.m2文件。我退出了root并重新安装了mvn。所以,它的工作 谢谢你的帮助 – ofakher