【问题标题】:deploying a war file with maven to tomcat using HTTPS使用 HTTPS 将带有 maven 的 war 文件部署到 tomcat
【发布时间】:2015-01-21 09:46:11
【问题描述】:

我正在使用 Tomcat 8、Maven 3.1.1、JDK 1.8.0_31 和 tomcat7-maven-plugin 2.2。 我的操作系统是 Windows 7 64 位。

当 Tomcat 配置为 HTTPS 时,我无法将 war 文件部署到它。 HTTP 工作正常。

我在 Stackoverflow 上找到了两个线程,但它们并没有解决我的问题。

密钥库文件只包含一个条目。 我的 maven settings.xml 包含 Tomcat 服务器的有效管理员凭据。

这里是 POM 插件配置。

        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <url>https://localhost:8443/manager/text</url>
                <server>tomcat8-local</server>
                <path>/entryServlet</path>
                <httpsPort>8443</httpsPort>
                <keystoreFile>D:\intellij-project\keystore\keystore</keystoreFile>
                <keystorePass>pass1</keystorePass>
            </configuration>
        </pugin>

这是 Maven 输出:

[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ intellij-project ---
[INFO] Deploying war to https://localhost:8443/entryServlet  
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.194s
[INFO] Finished at: Wed Jan 21 10:13:29 CET 2015
[INFO] Final Memory: 17M/206M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project intellij-project:
Cannot invoke Tomcat manager: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target -> [Help 1]

【问题讨论】:

  • 问题不是https,问题是https需要相互认证。

标签: java maven tomcat https


【解决方案1】:

我找到了解决方案:我必须将我自己创建的证书导入到 位于 JAVA_HOME/jre/lib/security 中的 Java 密钥库

我按照以下说明进行操作: No more 'unable to find valid certification path to requested target'

【讨论】:

  • 请帮助....按照那里的说明进行操作,但仍然出现错误....
猜你喜欢
  • 2012-05-08
  • 2013-03-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-27
  • 2016-08-23
  • 2018-07-25
  • 1970-01-01
相关资源
最近更新 更多