首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法执行目标org.apache.maven.plugins (权限被拒绝)

无法执行目标org.apache.maven.plugins (权限被拒绝)
EN

Stack Overflow用户
提问于 2014-10-23 10:09:18
回答 1查看 2.5K关注 0票数 2

在ubuntu 14.04上构建maven项目时,我得到了这个错误。我的命令:mvn liferay:build-service compile package

代码语言:javascript
运行
复制
Writing /home/hien/bitnemo/gtsportlets/gts-portlet-service/src/main/java/com/gts/portlets/eventdata/service/persistence/EventDataPersistence.java
    Writing /home/hien/bitnemo/gtsportlets/gts-portlet-service/src/main/java/com/gts/portlets/eventdata/service/persistence/EventDataUtil.java
    Writing /home/hien/bitnemo/gtsportlets/gts-portlet-service/src/main/java/com/gts/portlets/eventdata/model/EventDataWrapper.java
    Building EventOverSpeed
    Building EventPTO
    Building FnolDetail
    Building FnolMainEvent
    Building GeoCorridor
    Building GeoCorridorList
    Building Geozone
    Building Pushpins
    [INFO] 
    [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ gts-portlet-service ---
    [debug] execute contextualize
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /home/hien/bitnemo/gtsportlets/gts-portlet-service/src/main/resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ gts-portlet-service ---
    [INFO] Compiling 321 source files to /home/hien/bitnemo/gtsportlets/gts-portlet-service/target/classes
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR : 
    [INFO] -------------------------------------------------------------
    [ERROR] error: error reading /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/mysql-connector-java-5.1.21.jar; /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/mysql-connector-java-5.1.21.jar (Permission denied)
    [INFO] 1 error
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] gts ............................................... SUCCESS [  1.263 s]
    [INFO] gts Portlet Service ............................... FAILURE [02:23 min]
    [INFO] WTP Portlet ....................................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:25 min
    [INFO] Finished at: 2014-10-23T08:53:09+07:00
    [INFO] Final Memory: 56M/263M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project gts-portlet-service: Compilation failure
    [ERROR] error: error reading /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/mysql-connector-java-5.1.21.jar; /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/mysql-connector-java-5.1.21.jar (Permission denied)
    [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 :gts-portlet-service
    hien@hien-eME730G:~/bitnemo/gtsportlets$ sudo mvn liferay:build-service compile package
    [INFO] Scanning for projects...
    [ERROR] The build could not read 1 project -> [Help 1]
    [ERROR]   
    [ERROR]   The project com.example.plugins:gts:1.0.0-SNAPSHOT (/home/hien/bitnemo/gtsportlets/pom.xml) has 1 error
    [ERROR]     'build.plugins.plugin.version' for com.liferay.maven.plugins:liferay-maven-plugin must be a valid version but is '${liferay.maven.plugin.version}'. @ line 16, column 14
    [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/ProjectBuildingException

之后,我使用sudo:$sudo mvn liferay:build-service compile package权限运行,但仍然不能解决这个问题,请帮助我。

EN

回答 1

Stack Overflow用户

发布于 2014-10-23 10:28:37

该文件可能被另一个进程锁定:

执行"lsof /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/mysql-connector-java-5.1.21.jar“”,查看哪个进程可能持有排它锁。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26520209

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档