SSL client certificate in Maven

前端 未结 2 1455
臣服心动
臣服心动 2020-12-02 01:21

I use the \"maven-jaxb22-plugin\" to generate classes so I can call a web service written in .Net. Usually it works fine but this time, I can only access the WSDL using a cl

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 02:05

    You could use the Maven properties plugin or use a JVM property to provide the trust store location.

    In your POM build/plugins section, add a new plugin entry, where the keystore would be YourKeyStore.jks for this example:

    ..
    
            org.codehaus.mojo
            properties-maven-plugin
            1.0-alpha-2
            
              
                
                  set-system-properties
                
                
                  
                    
                      javax.net.ssl.trustStore
                      ${basedir}/src/test/jmeter/jmeterTrustedKeystore.jks
                    
                    
                      javax.net.ssl.keyStorePassword
                      changeit
                    
                  
                
              
            
    
    ...
    

提交回复
热议问题