SSL Configuration on Maven Tomcat Plugin

后端 未结 2 720
感情败类
感情败类 2020-12-24 10:00

I am trying to develop a Wicket app. It\'s login page must open with SSL. So I did some coding. But I can\'t find to configure the maven tomcat 7 plugin for SSL. I created k

相关标签:
2条回答
  • 2020-12-24 10:08

    I was able to get it working with:

    <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
            <path>/mycontext</path>
            <port>9090</port>
            <httpsPort>8443</httpsPort>
            <keystorePass>changeit</keystorePass>
        </configuration>
    </plugin>
    

    Be sure you create the keystore from the documentation: http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html (it looks like you have that part) and what finally worked for me was to create the keystore (in the default directory) with both passwords as "changeit"... not sure why, but for me this is ok in this case as this is for local development only.

    I am running on Windows 7, Maven 3.

    Hope this helps.

    0 讨论(0)
  • 2020-12-24 10:12

    With this configuration in my pom.xml I get it working:

    <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
            <path>/${project.build.finalName}</path>
            <contextFile>${basedir}/context.xml</contextFile>
            <httpsPort>8443</httpsPort>
            <keystoreFile>${basedir}/certificates/keystore.jks</keystoreFile>
            <keystorePass>password</keystorePass>
        </configuration>
    </plugin>
    
    0 讨论(0)
提交回复
热议问题