繁体   English   中英

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

[英]Failed to execute goal org.apache.maven.plugins (permission denied)

在Ubuntu 14.04上构建Maven项目时出现此错误。 我的命令: mvn liferay:build-service compile package

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权限,但仍然无法解决此问题,请帮助我。

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM