Help please ... I've tried a number of things with no success.
The backstory ...
I'm writing a soap-based web service app. It's sole purpose is to take requests from users, reformat the request for an internal system which is also soap-based running on an SSL encrypted server. I get a response back from the SSL server, repackage it as a response to the original user request and send it back.
The problem I'm having is for integration tests. In Eclipse, if I Run or Debug, my integration tests run fine ... but I do have to set up JVM parameters in a run configuration, I've got ...
-Djavax.net.ssl.trustStore=C:\apache\apache-tomcat-6.0.20\conf\tokenserver-keystore.jks
-Djavax.net.ssl.trustStorePassword=Pass1word
The jks file contains all the info needed to talk to the SSL server.
The problem ...
When running Maven from inside Eclipse or externally, I get the following exception
WARNING: Interceptor for {http://xc.protegrity.com/ApplicationProtectorWS}ApplicationProtectorWSPortTypeService#{http://xc.protegrity.com/ApplicationProtectorWS}xcCreateSession has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
with the following ...
Caused by: javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking
https://tokenserver.protegrity.com/ws/services/ApplicationProtectorWS.2.0: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I've tried defining MAVEN_OPTS with those lines pointing to the trust store in a maven_pre.bat file (Windows 7), to a .mavenrc file (when running Cygwin), I even defined MAVEN_OPTS explicitly in Window's environment variables ... but no luck. I still get the exception.
How do I define the trust store that Eclipse accepts but maven does not?
Thanks