Welcome! Please see the About page for a little more info on how this works.
I've copied this question from #tools.deps slack channel :
Hi all! Does clojure take MAVEN_OPTS from environment variables? I can’t use keystore with clojure, but it’s work with mvn (directly). I need to use keystore.jks with self-signed corp certificates. I don’t have problems with credentials configured in settings.xml. Maven by default pick up settings from .mavenrc or MAVEN_OPTS, but I didn’t see any usages in sources of tools.deps
clojure
MAVEN_OPTS
keystore
mvn
keystore.jks
tools.deps
Thanks for any help!
Logged as https://clojure.atlassian.net/browse/TDEPS-165
Hello. I'm a mvn noob. I know nothing about mvn or jks but I will try to dig about this.
At tools.deps repo, i see that it do not implement nothing about MAVEN_OPTS https://github.com/clojure/tools.deps.alpha/search?q=MAVEN_OPTS&unscoped_q=MAVEN_OPTS
Nothing about keystore https://github.com/clojure/tools.deps.alpha/search?q=keystore&unscoped_q=keystore
Looks like that clojure/tools.deps.alpha uses org.apache.maven.resolver API's https://github.com/clojure/tools.deps.alpha/blob/master/deps.edn#L4
clojure/tools.deps.alpha
org.apache.maven.resolver
Then I find this repo https://github.com/apache/maven-resolver
This repo do not implement nothing about MAVEN_OPTS https://github.com/apache/maven-resolver/search?q=MAVEN_OPTS&unscoped_q=MAVEN_OPTS
But I found a occorence of keystore
https://github.com/apache/maven-resolver/blob/47edcfe69c4e52ced4cb93d65b7348b5645cdd68/maven-resolver-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java#L71
MAYBE
clj -J-Djavax.net.ssl.keyStore=my-custom-keystore.jks
will work. you can use :jvm-opts inside deps.edn
:jvm-opts
deps.edn
:alias {:custom-keystore {:jvm-opts ["-D..."]}}
then use clj -A:custom-keystore:dev:repl ....
clj -A:custom-keystore:dev:repl ....