Uploaded image for project: 'ZK Document'
  1. ZK Document
  2. ZKDOC-9

Documentation how to connect to an EE repository with Maven is incomplete

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • Documentation
    • None

      The documentation shows how to supply the user/password to Maven but there is no explanation how to pass the self-signed SSL certificate to Maven.

      Add this to the document at http://books.zkoss.org/wiki/ZK_Installation_Guide/Setting_up_IDE/Maven/Use_ZK_Maven_Repository_without_IDE :

      The Maven repository at maven.zkoss.org uses a self-signed SSL certificate. Use the following steps to allow Maven to accept this certificate:

      1. Create a new keystore using this command: keytool -genkey -alias server-alias -keyalg RSA -keypass changeit -storepass changeit -keystore keystore.jks

      It will ask a lot of questions which you can answer with Unknown except for the last one ("Is this correct?") where you should answer Yes

      This will give you a new file keystore.jks

      2. Use the Nexus tool import-ssl.jar to import the servers' SSL certificate: java -jar import-ssl.jar server maven.zkoss.org keystore.jks changeit

      This should print:

      Loading KeyStore keystore.jks...
      Setting up SSL...
      Opening connection to maven.zkoss.org:443...
      Starting SSL handshake...
      
      Some SSL certificates appear to be missing. Adding missing certificates...
      
      
      Server sent 2 certificate(s):
      
       1 Subject [email protected], CN=maven.zkoss.org, O=Potix corporation, ST=Asuka Chen, C=TW
         Issuer  [email protected], CN=maven.zkoss.org, O=Potix corporation, L=Taipei, ST=Asuka Chen, C=TW
         sha1    4f 89 ad df 70 ed 55 ea 54 7f 5e 84 34 2b 4c 74 8e 4d 2f 7d 
      
      
      Added certificate to keystore using alias: 'maven.zkoss.org'
       2 Subject [email protected], CN=maven.zkoss.org, O=Potix corporation, L=Taipei, ST=Asuka Chen, C=TW
         Issuer  [email protected], CN=maven.zkoss.org, O=Potix corporation, L=Taipei, ST=Asuka Chen, C=TW
         sha1    2a 76 e7 83 94 53 bc a7 42 33 14 7c ab fc 01 e3 c9 06 33 73 
      
      
      Added certificate to keystore using alias: 'maven.zkoss.org-1'
      

      If you get an error, make sure you use the keytool that came with the Java installation that you're using. Mixing keytools from different Java versions does not work.

      3. Pass the options -Djavax.net.ssl.keyStore=.../keystore.jks -Djavax.net.ssl.keyStorePassword=changeit (replace ... with the absolute path to the file) to Maven when you run it, for example by adding them to the environment variable MAVEN_OPTS.

            Unassigned Unassigned
            digulla digulla
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: