Skip to content

Instantly share code, notes, and snippets.

@bohrqiu
Created August 21, 2014 06:55
Show Gist options
  • Save bohrqiu/817669f38261104c31d8 to your computer and use it in GitHub Desktop.
Save bohrqiu/817669f38261104c31d8 to your computer and use it in GitHub Desktop.
tomcat-maven-plugin config ssl
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>keytool-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<id>clean</id>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<phase>generate-resources</phase>
<id>genkey</id>
<goals>
<goal>genkey</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>${project.build.directory}/tomcat-ssl.keystore</keystore>
<dname>cn=localhost</dname>
<keypass>tomcat</keypass>
<storepass>tomcat</storepass>
<alias>tomcat</alias>
<keyalg>RSA</keyalg>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>11111</port>
<uriEncoding>UTF-8</uriEncoding>
<httpsPort>8443</httpsPort>
<keystoreFile>${project.build.directory}/tomcat-ssl.keystore</keystoreFile>
<keystorePass>tomcat</keystorePass>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
@vito16
Copy link

vito16 commented Aug 21, 2014

Good job~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment