Welcome! Please see the About page for a little more info on how this works.

+1 vote
in tools.deps.alpha by
retagged by

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

Thanks for any help!

2 Answers

+1 vote
0 votes

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

Nothing about keystore

Looks like that clojure/tools.deps.alpha uses org.apache.maven.resolver API's

Then I find this repo

This repo do not implement nothing about MAVEN_OPTS

But I found a occorence of keystore



clj -J-Djavax.net.ssl.keyStore=my-custom-keystore.jks

will work.
you can use :jvm-opts inside deps.edn

:alias {:custom-keystore {:jvm-opts ["-D..."]}}

then use clj -A:custom-keystore:dev:repl ....

Thank you for the help!
The first attempt I tried was to add :jvm-opts with alias, but it's doesn't work.
I found the easiest way - add certificates to cacerts. It's works.
But I think the best way it is support MAVEN_OPTS.