Maven: how to config the tomcat plugin to deploy on https remote site
I am trying to deploy my web app remotely using the tomcat plugin from maven (mvn tomcat:deploy).
The Tomcat App Server Manager is at https://MyRemoteTomcatInstance/manager.
Firstly, I added the certificate to my trust store with this command:
keytool -v -alias mavensrv -import -file /Users/christianachilli/Desktop/KubePartnersLtd.p12 -keystore /Users/christianachilli/trust.jks
The file KubePartnersLtd.p12 is the result of exporting the site certificate with the Browser (I used FF 3.6).
Secondly, I added the
.mavenrc
file and here comes the pain for me! I am no开发者_StackOverflowt sure of what should I put in it. At the moment I filled it in with:
MAVEN_OPTS="-Xmx512m -Djavax.net.ssl.trustStore=/Users/christianachilli/trust.jks \
-Djavax.net.ssl.trustStorePassword=123456 \
-Djavax.net.ssl.keyStore=/Users/christianachilli/.keystore \
-Djavax.net.ssl.keyStoreType= \
-Djavax.net.ssl.keyStorePassword="
This gives me an error:
No subject alternative names present
I tried many other combination using the brute force pattern but I couldn't succeed. I'd really appreciate if someone could point me in the right direction about what should be the parameters in
MAVEN_OPTS
Thanks and regards, C
Check which CN is KubePartnersLtd.p12
for, e.g. localhost
in the following example:
$ openssl verify tomcat-p12.crt
tomcat-p12.crt: /C=Unknown/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/CN=localhost
[...]
Make sure that such CN matches the DNS name you're using in the tomcat plugin configuration. In case they're not the same, you might consider adding an entry to your hosts file.
精彩评论