Closed Andy-L closed 4 years ago
getting same error for gradle task. using Gradle 6.7
stage('Compile') {
task ('Exec Gradle') {
rtGradle.run rootDir: ".", buildFile: 'build.gradle', tasks: 'clean assemble', buildInfo: buildInfo
}
}
17:09:19 Starting a Gradle Daemon (subsequent builds will be faster)
17:09:22
17:09:22 FAILURE: Build failed with an exception.
17:09:22
17:09:22 * What went wrong:
17:09:22 Failed to create Jar file /home/xxxx/.gradle/caches/jars-8/8535adf040d7c5fdb7fd6bc28bb0ef3f/ok.
17:09:22 > Prefix string too short
17:09:22
17:09:22 * Try:
17:09:22 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.
17:09:22
17:09:22 * Get more help at https://help.gradle.org
17:09:22
17:09:22 BUILD FAILED in 4s
[Pipeline] }
[Pipeline] // task
[Pipeline] }
[Pipeline] // stage
[Pipeline] echo
17:09:23 java.lang.RuntimeException: Gradle build failed
@sfgroups-k8s @Andy-L, Thanks for reporting this issue. The fix is already included in the latest Jenkins Artifactory plugin 3.9.0. Feel free to upgrade. We'd appreciate your feedback for that!
Describe the bug A Jenkins build using the artifactory plugin and java 8 fails on gradle 6.6 (or 6.6.1) with the error:
It happens even using
"help"
as the gradle task, which only runs scripts, so it isn't related to my build config.A longer snippet of the log:
To Reproduce Build a gradle java project using the artifactory plugin and gradle 6.6 or 6.6.1.
Expected behavior The gradle build proceeds normally and builds the project.
Versions
Additional context It looks like the
ok
is coming from a marker file in the dependencies directory (near the bottom):...which is created by PluginDependencyHelper.
It looks like gradle 6.6 is now trying to cache all of the dependencies in its own dependency cache, and failing on
ok
because it is too short of a filename.