Passing Environment Variable to Headless Launch [message #1767440] |
Thu, 06 July 2017 06:19  |
Eclipse User |
|
|
|
Hello,
during my buckminster build I start an eclipse application via buckminsters launch command. In order to run the application properly I need to set some environment variables such as MAVEN_HOME and GRADLE_USER_HOME.
So far I tried to pass the variables like this
launch --launch "org.foo.bar/launcher/${build.name}.launch" --stdout --stderr -DGRADLE_USER_HOME="${build.location.project}/gradle" -DMAVEN_HOME="${build.location.project}/maven"
Unfortunately, that is not working.
Is there a way to pass environment variables to the launch config or do I have to change the launch config itself? The latter is not my favorite option, because I only need to change the environment variables when I am running the build on the CI Server.
Any help appreciated.
Thank in advance,
Hendrik
|
|
|
Re: Passing Environment Variable to Headless Launch [message #1767481 is a reply to message #1767440] |
Thu, 06 July 2017 10:47  |
Eclipse User |
|
|
|
In your launch configuration (xxx.launch file), on the "Environment" tab, you can set "Append environment to the native environment" - in fact, I think that's the default.
You should then be able simply to set the environment variables in your shell before running Buckminster. Remember that you need to export var=val so that the environment variable is inherited by the sub-process (Buckminster).
Matthew
|
|
|
Powered by
FUDForum. Page generated in 0.04794 seconds