0

我想修复 vaadin openlayers Add-on 中的一些错误。因此,为了构建源代码,我按照此链接http://code.google.com/p/vopenlayers/wiki/DevelopingAndBuilding中的步骤进行操作。但是,运行 mvn install 命令时出现此错误:

[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 64bit

4

1 回答 1

1

您确定需要使用root.m2 文件夹吗?请不要使用它。这有助于避免与安全/权限相关的麻烦。

我猜您正在使用与 root 不同的用户配置文件进行 mvn install,并且您的 settings.xml 指向 .m2 下的 .m2 root。maven 进程试图通过 zip 文件提取一些依赖项,然后遇到文件权限问题。

于 2012-11-28T11:11:40.463 回答