Reputation: 113
I have a Maven project in Eclipse IDE. In the root of this maven project there is .mvn
folder with jvm.config
file (supported in Maven 3.3.1+). This file contains SSL truststore and password
-Djavax.net.ssl.trustStore="C:/certificates/cert.jks"
-Djavax.net.ssl.trustStorePassword=***
Certificate exists in the mentioned directory. I have settings.xml file in my userhome/.m2
folder. Eclipse configured to use external Maven installation (excluding dependency resolution, because Eclipse IDE uses embedded Maven for that forcibly). Everything has been configured properly.
mvn clean package
from command line, then it works fine - all dependencies are downloaded from company Nexus repo and remote repositories..mvn
is missing in the project root).mvn
is missing in the project root)trustStore
and password in command line like below, then again it works. (assume .mvn
is missing in the project root)mvn -Djavax.net.ssl.trustStore="C:/certificates/cert.jks -Djavax.net.ssl.trustStorePassword=*** clean package
.mvn
folder and jvm.config
file)I have many workarounds, but want to know exactly about .mvn
with nested configs. How to configure Eclipse IDE (or Eclipse Maven plugin) to use that .mvn
folder with all nested configs for successful dependency resolution?
Tested this with
Upvotes: 0
Views: 354
Reputation: 1195
It may help you despite not answering the question directly: if your IT has distributed the certificates on your windows computer but Java does not see them and forces you to use a specific jks file, an alternative may be to define this env variable:
JAVA_TOOL_OPTIONS=-Djavax.net.ssl.trustStoreType=Windows-ROOT
if your windows is configured with the certs, it will allow Java to access it without a specific aditional file.
Upvotes: 1