microsoft/vscode-gradle

GRADLE_SERVER_OPTS variable overriden and not used for gradle server

Open

#1,604 opened on Sep 10, 2024

View on GitHub
 (2 comments) (2 reactions) (0 assignees)Java (85 forks)github user discovery
ai-triagedbuggood first issuehelp wanted

Repository metrics

Stars
 (170 stars)
PR merge metrics
 (PR metrics pending)

Description

Extension Name: vscode-gradle Extension Version: v3.16.4 OS Version: Ubuntu VSCode version: 1.93

Describe the bug The system variable GRADLE_SERVER_OPTS is overriden and not taken in account by the gradle server instanciated by VSCode. I used this variable to set proxy settings -Dhttps.proxyHost etc to be able to use it behind a proxy

To Reproduce Steps to reproduce the behavior. set GRADLE_SERVER_OPTS at system level, such as: ~$ echo $GRADLE_SERVER_OPTS -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888

Expected behavior what was set in GRADLE_SERVER_OPTS is used in the extensions/vscjava.vscode-gradle-3.16.4/lib/gradle-server script and visible in the [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED... log message

Screenshots NA

Output from "Gradle for Java" [info] [gradle-server] Gradle Server started, listening on 35015 [info] Gradle client connected to server [info] Java Home: /home/developer/.vscode-server/extensions/redhat.java-1.34.0-linux-x64/jre/17.0.12-linux-x86_64 [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED,--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant

Does the bug still exist if you disable all other extensions? Yes

Additional context NA

Contributor guide