jfrog-idea-plugin
jfrog-idea-plugin copied to clipboard
JFrog Plugin Fails If You Run on Windows using Windows Subsystem Linux and Gradle
Describe the bug If you are on any version of Windows and have installed Windows Subsystem for Linux (WSL) in order to install Gradle via SDKMAN, *which is the recommended way in the docs then the JFrog plugin completely fails to run since it doesn't use WSL. Worth noting calling gradle using WSL is also supported by IntelliJ, which means users are likely to want feature parity.
To Reproduce Setup a Windows machine with Gradle on WSL. Get a gradle project loaded into IntelliJ, watch the plugin fail with null pointer exceptions.
Expected behavior The plugin should use the same command line/tools to execute that IntelliJ uses for Gradle projects.
Screenshots I can provide a stacktrace:
java.lang.Throwable: Could not scan Gradle project dependencies, because Gradle CLI is not in the PATH.
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
at com.jfrog.ide.idea.log.Logger.error(Logger.java:51)
at com.jfrog.ide.common.gradle.GradleTreeBuilder.buildTree(GradleTreeBuilder.java:48)
at com.jfrog.ide.idea.scan.GradleScanManager.buildTree(GradleScanManager.java:63)
at com.jfrog.ide.idea.scan.ScanManager.scanAndUpdate(ScanManager.java:107)
at com.jfrog.ide.idea.scan.ScanManager$1.run(ScanManager.java:145)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:497)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Versions
- JFrog IDEA plugin version: 1.9.1
- Operating system: Windows 10
- Xray version: 3.27.3
I tried to find a root cause in this repository, but it appears to be in a private repository owned by JFrog. :(
Thank you for reporting this issue @jaybyrrd. This is definitely something we'd like to fix. We're currently working on multiple improvements to the plugin and we'd like to include this one as well. We'll update this issue once we implement this improvement.
You're welcome! Thanks for letting me know. We were considering dual booting Debian in the meantime. Not to rush you, but so that we are aware, what kind of timeline is this on?
We're aiming towards the second half of next week or the week after @jaybyrrd.
Excellent, thank you!
@jaybyrrd, Thanks for reporting this issue. We released JFrog IDEA plugin 1.10.1. In this version, we use the Gradle executable and Java home as configured in the Gradle settings. This may resolve your issue.
Feel free to upgrade. We'd appreciate your feedback on that.