java - jenkins 无法执行目标 org.apache.maven.plugins :maven-release-plugin:2. 3.2:prepare (default-cli)

标签 java maven jenkins

[INFO] Verifying that there are no local modifications...
[INFO]   ignoring changes on: **/pom.xml.backup, **/release.properties, **/pom.xml.branch, **/pom.xml.next, **/pom.xml.releaseBackup, **/pom.xml.tag
[INFO] Executing: /bin/sh -c cd /opt/Jenkins/ic/jenkins/jobs/util/workspace && git status
[INFO] Working directory: /opt/Jenkins/ic/jenkins/jobs/util/workspace
[INFO] Checking dependencies and plugins for snapshots ...
[INFO] Transforming 'my_proyect'...
[INFO] Not generating release POMs
[INFO] Executing goals 'clean verify'...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:23.375s
[INFO] Finished at: Wed Jan 22 15:21:16 ECT 2014
[JENKINS] Archiving /opt/Jenkins/ic/jenkins/jobs/util/workspace/pom.xml to xx.xxx.xxxx/my_proyect/1.0.2-SNAPSHOT/my_proyect-1.0.2-SNAPSHOT.pom
[INFO] Final Memory: 16M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project my_proyect: Could not create temporary file for release settings.xml: 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
channel stopped
Finished: FAILURE

我需要帮助。 构建快照时不会给我带来问题,但如果我想生成版本,我会得到上述日志。 我有 Jenkins 1.548 maven 3.1.1 联结2.7.0-0

最佳答案

Jenkins + maven-release-plugin + settings.xml = 痛苦

检查以下位置是否有提及或覆盖 settings.xml 文件:

  • Jenkins
    • 实例级配置
      • 一般 Maven 部分
      • Maven 发布插件部分
    • 作业级别配置
      • 一般 Maven 部分
      • Maven 发布插件部分
  • pom.xml 文件
    • maven-release-plugin 部分
    • 个人资料部分

此外,事情可能会变得很麻烦,具体取决于您在 Jenkins 中运行作业的方式:

  • 以 Maven 为目标的自由式工作
  • 使用常规“构建”按钮和“发布:准备”目标的 Maven 作业
  • 使用“运行 Maven 发布”按钮构建 Maven

尝试尝试不同的工作类型。

关于java - jenkins 无法执行目标 org.apache.maven.plugins :maven-release-plugin:2. 3.2:prepare (default-cli),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21293696/

相关文章:

java - Spring Boot 。从 MySql 模式自动创建实体类

java - Thymeleaf#strings.replace 为正则表达式和 :fragment

java - Firebase 安卓。如果我多次添加同一个监听器怎么办?

Java Servlet 响应设置 CSV 的内容长度

java - 当范围标记为 'test' 时导入 testng 类

java - 从 App Engine 模块内读取文件

java - 在 Maven 中使用 AspectJ 方面编织生产类,仅用于测试执行

shell - 覆盖 openshift maven 脚本(jenkins gear)

Jenkins如何创建管道手动步骤

Jenkins 管道构建 : Viewing Workspace in the UI