I have created a Maven Run Configuration in Intellij (Community Edition, Mac, Yosemite), and want to set up an Environmental Variable in the "Runner" tab of the configuration. In the value of that variable, I was wanting to use a parent environmental variable (specifically, $HOME
) for part of the value.
For example: Run > Edit Configuration > Add New > Maven > Runner (tab) > Environmental Variables > Add New:
SOME_CONFIG_FILE
$HOME/.config/file.json
I have tried with HOME
, $HOME
, $HOME$
, ${HOME}
and %HOME%
and none of them were able to resolve properly. Clicking on the "Show" for the Parent Environmental Variables show HOME with the proper value.
What is the correct way to set the value?
From the main menu, select Run | Edit Configurations or choose Edit Configurations from the run/debug configurations selector on the toolbar. In the Run/Debug Configurations dialog, select a configuration you want to add the environment variables to. Type the variable name and value: <name>=<value> .
Open settings, then select plugins In the search box search for “. env files support” and install it. After restarting IntelliJ you will have a new tab in the Run Configurations screen called EnvFile.
It's not supported at the moment:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With