-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails on Windows with Guava 32.0.0 #737
Comments
Suggest the following patch: diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/util/DependenciesDownloaderHelper.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/util/DependenciesDownloaderHelper.java
index f74280ba..a1210ac7 100644
--- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/util/DependenciesDownloaderHelper.java
+++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/util/DependenciesDownloaderHelper.java
@@ -1,6 +1,6 @@
package org.jfrog.build.extractor.clientConfiguration.util;
-import com.google.common.io.Files;
+import java.nio.file.Files;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.BooleanUtils;
@@ -245,7 +245,7 @@ public class DependenciesDownloaderHelper {
protected Map<String, String> downloadFileConcurrently(final String uriWithParams, long fileSize, final String fileDestination, String filePath)
throws Exception {
String[] downloadedFilesPaths;
- File tempDir = Files.createTempDir();
+ File tempDir = Files.createTempDirectory(null).toFile();
String tempPath = tempDir.getPath() + File.separatorChar + filePath;
try {
downloadedFilesPaths = doConcurrentDownload(fileSize, uriWithParams, tempPath); |
As the Guava developer responsible for this, I apologize for the trouble. I endorse the patch above, and I am working to fix this in Guava for anyone who isn't in a position to make such changes. |
The Guava fix is released for anyone who needs it: https://github.com/google/guava/releases/tag/v32.0.1 |
Even with the Guava fix in place, we got another report of trouble from a Jenkins user with a slightly unusual setup (specifically, running as a Windows service). There may still be something that we can do about it on the Guava side, but if JFrog can apply the patch above, that would definitely solve that part of the problem. |
Thanks for the information, @cpovirk. |
Run Jenkins 2.407 with the Artifactory plugin containing this code, on a Windows machine. That leads to exceptions because some methods in Guava 32.0.0 simply don't work anymore on Windows. Older versions of Jenkins core contained Guava 31.x and therefore work fine.
Jenkins bug: https://issues.jenkins.io/browse/JENKINS-71375
Guava change describing the non-working behavior: google/guava@3dfe363
The Jenkins core developers recommend removing Guava from Jenkins plugins. I support that opinion.
The text was updated successfully, but these errors were encountered: