You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

How to configure a Maven to use Java keystores with Windows

PREREQUISITES

Before you begin, you must have the following:

  • a trusted server Java keystore.

    Need a Trusted Server Java keystore?  Here are instructions on how to create a trusted server Java keystore.

Define The MAVEN_OPTS environmental variable

To configure Maven to use Java keystores with Mac OS X, you need to modify .mavenrc in your home directory and add the environment variable MAVEN_OPTS:

1.  The MAVEN_OPTS environmental variable


Starting from the Windows Task Bar goto:

           start->Control Panel->System->Advanced->Environment Variables

and a dialog, similar to the one below, will be displayed:

          

Under System variables, click the New button and the following dialog will be display:

          

Enter the following:

          Variable name:  MAVEN_OPTS
          Variable value:  -Djavax.net.ssl.trustStore=/path/to/the/serverTrustStore.jks -Djavax.net.ssl.trustStorePassword="XXXXXX"
          making the appropriate adjustment for /path/to/the/serverTrustStore.jks and the password "XXXXXX".

          

When satisfied that everything is correct, click the OK button.

When the Environmental Variables dialog re-appears, click the OK button.

Finally, you must reboot your workstation.

You can now access the Maven repositories using https.

  • No labels