jenkins - Jenkins Job-Gradle 构建
问题描述
我有 gradle 的 java 项目。在本地我可以创建 jar,但是当我使用 jenkins 运行作业时,它会给出以下错误。
Started by user admin
Running as SYSTEM
Building in workspace C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Local Project
[Gradle] - Launching build.
[Local Project] $ cmd.exe /C "C:\gradle-5.0\bin\gradle.bat makeDeploymentJar-Pcmm -b C:\OUP\oup-aps\build.gradle && exit %%ERRORLEVEL%%"
Starting a Gradle Daemon, 1 busy and 3 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\OUP\oup-aps\build.gradle' line: 25
* What went wrong:
Plugin [id: 'io.github.http-builder-ng.http-plugin', version: '0.1.1'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.github.http-builder-ng.http-plugin:io.github.http-builder-ng.http-plugin.gradle.plugin:0.1.1')
Searched in the following repositories:
Gradle Central Plugin Repository
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 25s
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE
------------------------------------------------
build.gradle line: 25
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven'
id 'eclipse'
id "io.github.http-builder-ng.http-plugin" version "0.1.1"
}
解决方案
推荐阅读
- c - 打印给定字符串的所有子字符串的程序
- control-m - 需要处理 Control-M File watcher 命令中文件名之间的空格
- c - strcmp 不适用于具有相同长度的相同字符串
- curl - 尝试使用 cURL 发送此表单 POST 请求
- bash - 在 SSH 会话中设置环境变量
- java - 拆分用户输入的字符串,然后打印字符串
- python - Python将字节转换为有符号整数(想要一个负整数作为结果)
- asp.net-core - Asp.NET Core 模型绑定输入类型复选框未保持未选中状态
- android - NestedScrollView 修复 NestedScrollView 内部的视图顶部
- facebook - Facebook app_insights 指标键返回 0 个数据