Maven:如何配置 tomcat 插件部署在 https 远程站点上
我正在尝试使用 maven (mvn tomcat:deploy) 中的 tomcat 插件远程部署我的 Web 应用程序。
Tomcat 应用程序服务器管理器位于 https://MyRemoteTomcatInstance/manager。
首先,我使用以下命令将证书添加到我的信任存储中:
keytool -v -alias mavensrv -import -file /Users/christianachilli/Desktop/KubePartnersLtd.p12 -keystore /Users/christianachilli/trust.jks
文件 KubePartnersLtd.p12 是使用浏览器导出站点证书的结果(我使用 FF 3.6)。
其次,我添加了
.mavenrc
文件,这对我来说是痛苦!我不确定我应该在里面放什么。目前我填写了:
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="
这给了我一个错误:
不存在主题备用名称
我尝试了使用暴力模式的许多其他组合,但我无法成功。如果有人能指出我关于参数应该是什么的正确方向,我真的很感激
MAVEN_OPTS
感谢和问候, C
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 not 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查哪个 CN 是
KubePartnersLtd.p12
,例如以下示例中的localhost
:确保此类 CN 与您在 tomcat 插件配置中使用的 DNS 名称匹配。如果它们不相同,您可以考虑在 hosts 文件中添加一个条目。
Check which CN is
KubePartnersLtd.p12
for, e.g.localhost
in the following example: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.