To analyze projects, the plugin uses the Snyk CLI. The CLI needs the following environment variables:
PATH: The path to needed binaries, for example, to Maven. The
PATHvariable can also be manually adjusted using the
Pathfield in the settings dialog.
JAVA_HOME: The path to the JDK you want to use to analyze Java dependencies.
https_proxy: Proxy set using the value in the format
http://username:password@proxyhost:proxyport. Note: the leading
http://in the value does not change to
https_proxy. If you populate the proxy settings in Eclipse, the Snyk plugin will set the environment variables automatically for Language Server and CLI.
Setting these variables only in a shell environment (for example, using
~/.bashrc) is not enough, if you do not start Eclipse from the command line or create a script file that starts Eclipse using a shell environment.
On Windows, set the variables using the GUI or on the command line using the setx tool.
On macOS, the process
launchdneeds to know the environment variables to launch Eclipse directly from the Finder. Set these environment variables using the
launchctl setenvcommand (for example, on start up or using a script you launch at user login). Note: Providing environment variables to the macOS UI may change between operating system releases, so it can be easier to create a small shell script that launches the Eclipse app to leverage the shell environment. This can be defined via
On Linux, you can update the file
/etc/environmentto propagate the environment variables to the windows manager and UI.
Summary: Snyk's Eclipse plugin uses the proxy settings from Eclipse, but also picks up the proxy settings from the environment variables.