Jenkins无法执行Maven pom.xml

时间:2015-12-29 18:54:20

标签: java macos maven jenkins

我在Mac OS上的Jenkins存在很大问题。所以我安装了Jenkins,制作了一个简单的类并转换为Maven,在Jenkins上创建了一个新工作并指定了pom.xml位置(Jenkins认为它没问题)但是当我尝试构建我的类时,我总是得到一个错误,因为Jenkins不能写mojo状态或者其他东西。这是我的控制台输出

Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/workspace/Cocotest
Parsing POMs
[Simple2] $ /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java -cp /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/usr/local/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/usr/local/apache-maven-3.3.9/conf/logging jenkins.maven3.agent.Maven31Main /usr/local/apache-maven-3.3.9 /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-2.53.2.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 51372
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f /Users/alex-macbook/Eclipse workspace/Simple2/pom.xml install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple2 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Simple2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/alex-macbook/Eclipse workspace/Simple2/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Simple2 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.396 s
[INFO] Finished at: 2015-12-29T20:46:31+01:00
[INFO] Final Memory: 12M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Simple2: Error while storing the mojo status: /Users/alex-macbook/Eclipse workspace/Simple2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst (Permission denied) -> [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/MojoExecutionException
[JENKINS] Archiving /Users/alex-macbook/Eclipse workspace/Simple2/pom.xml to simple/Simple2/0.0.1-SNAPSHOT/Simple2-0.0.1-SNAPSHOT.pom
/Users/alex-macbook/Eclipse workspace/Simple2/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/Cocotest/Users/alex-macbook/Eclipse workspace/Simple2/; will archive in a separate pass
channel stopped
Finished: FAILURE

1 个答案:

答案 0 :(得分:0)

关于此错误消息:

Error while storing the mojo status:
/Users/alex-macbook/Eclipse workspace/Simple2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst (Permission denied)

我认为这更像是一种许可问题。

Jenkins正在与一位专门的jenkins用户一起运行。

您是否检查过该用户在您的工作目录中是否有R / W访问权限?