Sunday 5 June 2016

Setup Maven setting.xml for Nesus Access

  1. Download the settings.xml file from the nexus repo
    1. Create a blank settings.xml file in the C:\Users\{loginid}\.m2 folder.
  2. Encrypt your domain / AD password
    1. Create an encrypted master password by executing
    2. $ mvn --encrypt-master-password
      Master password:(type your password here) on the command line.
      Your password should look like {jOhnSnoWLives+jiuyrewhsidufsdjfks+9EF1iFQyJQ=}
    3. Update this password in the settings-security.xml file in the C:\Users\Redirection\{loginid}\.m2 folder. Make sure you are updating within the 'Redirection' folder and not elsewhere.
    4. Create an encrypted password (different from the master password) by executing
    5. $ mvn --encrypt-password
      Password: (type your password here) on the command line.
    6. Update the settings.xml file. Paste in your user id and generated non-master password in the servers section at the bottom of the file.
      More Details:  http://maven.apache.org/guides/mini/guide-encryption.html
  3. Install VeriSign CA certificate to the default truststore
    1. Download verisignClass3secureServerCA 
    2. Add the cert into your JVM - $JRE_HOME/lib/security/cacerts using the keyTool.exe utility
    3. Run below command as Admin
                    C:\Program Files\Java\jdk1.8.0_65\jre\lib\security>..\..\bin\keytool.exe -import
                    -trustcacerts -alias verisignClass3secureServerCA -file verisignClass3secureServerCA.cer -keystore cacerts
                    Enter keystore password:

                    Certificate was added to keystore

No comments:

Post a Comment