We are using IntelliJ (CE 2018.3) with sbt 1.2.3 and Artifactory. Since our Artifactory is protected by a self-issued certificate, we would like to add -Djavax.net.ssl.trustStore=c:/my/custom/cacerts
to the sbt command line as it is invoked in IntelliJ (or even better: anytime we invoke sbt on our PCs).
We would like to avoid patching the truststore of our JVM, since it's distributed to our machines through channels we do not control.
Are there any globally available environment flags or sbt settings that we can use for that, something like the sbt global settings?
Tried to specify all these flags in the IntelliJ sbt settings (which seems to be the proper place to do it), but it got stuck forever in "Refreshing project"
File > Settings > Build, Execution, Development > sbt > VM Parameters
-Dsbt.override.build.repos=true -Dsbt.repository.config=./some/path/sbt.repositories -Dsbt.boot.credentials=%USERPROFILE%/.sbt/.credentials -Djavax.net.ssl.trustStore=c:/Users/%USERNAME%/mycacerts
The command-line build works, using the flags shown above.
It works, as long as I don't try to use parameter substitution, i.e.
-Dsbt.boot.credentials=%USERPROFILE%/.sbt/.credentials
does not work, but
-Dsbt.boot.credentials=C:/Users/MyUser/.sbt/.credentials
works.