Add possibility to configure proxy in `<INTELLIJ_HOME>/jbr/conf/net.properties`
arolfes opened this issue · comments
I would like to have the possibility to configure the intellij idea proxy settings in <INTELLIJ_HOME>/jbr/conf/net.properties
I'm aware that the config of this role gets more complex but it would make it easier to use it in a playbook.
current workaround:
after intellij role runs successfully I have a post role where i do some stuff. like certificate import into jdk and also configure the proxy for intellij.
would it be possible to have such a feature?
Hello @freemanjp ,
I would like to implement a solution. you can review it.
When you say no, configure proxy is not part of this role it is also fine for me, then I will not spent time on a PR. Just let me know, please.
Hi @arolfes, I can see the benefit of such a feature. However, modifying files under <INTELLIJ_HOME>
is generally a bad idea as it causes issues when applying patch updates (I know the file permissions set by this role don't currently allow applying patch updates, but that's on my mental to-do list to fix).
The appropriate place to override setting like these are in the user-specific setting e.g. under ~/.config/JetBrains/IntelliJIdea2021.2/idea64.vmoptions
or ~/.config/JetBrains/IntelliJIdea2021.2/idea.properties
.
All the properties in net.properties
appear to be standard JVM system properties. You may want to consider adding your proxy settings to the JAVA_TOOL_OPTIONS
environment variable instead, this should apply to IntelliJ and other Java apps. I use this role for setting environment variables (https://galaxy.ansible.com/weareinteractive/environment - use at your own risk). FYI: you can also use javax.net.ssl.trustStore
to specify the location of a custom CA store with your corporate proxy certificate if necessary.
I've not tried the environment variable approach with IntelliJ, but I expect it's your easiest option (assuming it works - you may need to restart Linux for the environment changes to be picked up). However, if it doesn't work, or you still prefer an IntelliJ specific approach, I'm open to an enhancement/pull-request where you can add args to idea64.vmoptions
or properties to idea.properties
. For idea.properties
, this should overwrite where the key exists in the file. Whatever approach you choose, I suggest trying it manually before getting into the code (I don't know how fussy IntelliJ is about how you specify this config).
Hi @freemanjp ,
thank you for the detailed solution. I will go for idea.properties
in ~/.config/JetBrains/IntelliJIdea2021.2/idea.properties
Cheers