[
https://issues.apache.org/jira/browse/MNG-6329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16303932#comment-16303932
]
Robert Scholte commented on MNG-6329:
-------------------------------------
MAVEN_OPTS are indeed added to the JVM, not to the executable jar, so the
commandlines are as expected.
What you do matches
https://maven.apache.org/guides/mini/guide-repository-ssl.html
Be sure you haven't specified M2_HOME as Enviroment Varabiable
Have you tried:
{noformat:title=.mavenrc}
export javax.net.ssl.trustStore=internalca.jks
export javax.net.ssl.trustStorePassword=changeit
{noformat}
> SSL Truststore via MAVEN_OPTS fails
> -----------------------------------
>
> Key: MNG-6329
> URL: https://issues.apache.org/jira/browse/MNG-6329
> Project: Maven
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 3.5.2
> Environment: Apache Maven 3.5.2
> (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T15:58:13+08:00)
> Maven home: /usr/local/Cellar/maven/3.5.2/libexec
> Java version: 1.8.0_151, vendor: Oracle Corporation
> Java home:
> /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
> Default locale: en_SG, platform encoding: UTF-8
> OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"
> Reporter: Yogendra Rampuria
>
> We use an internal self-signed CA certificate for our repository.
> Certificates for these internal CAs are distributed via a jks file. I set
> MAVEN_OPTS in .mavenrc file (and also tried on command line)
> {code:title=Shell|borderStyle=solid}
> $ export MAVEN_OPTS="-Djavax.net.ssl.trustStore=internalca.jks
> -Djavax.net.ssl.trustStorePassword=changeit"
> $ mvn clean install
> ...snip...
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target
> ...snip..
> $ unset MAVEN_OPTS
> $ mvn clean -Djavax.net.ssl.trustStore=internalca.jks
> -Djavax.net.ssl.trustStorePassword=changeit install
> ..snip..
> BUILD SUCESS
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)