bmuschko/gradle-tomcat-plugin — pull request #59 by yajoe (2013-08-27 04:31:29+00:00)
Title: Allow persisting SSL keys for localhost

First, thank you for the plugin -- we use it extensively at my current job, and I've used it in the past at other jobs. We are big fans.

One small quirk that got to me after a few months was having to approve a self-signed SSL cert every time I spun up 'gradle tomcatRun' for integration testing, unit tests, debug sessions, etc. Often this is 20 times during a day. Different than pull request #35 that makes the keystore configurable, we have no requirement for using specific keys -- a self-signed cert is perfect since our project has to 'just work' on all new developer's machines within 5 minutes.

This change does two things:
1) It introduces a new setting called 'preserveSSLKey' that when true prevents the keystore file from getting deleted every run. This way subsequent runs will use the same self-signed key during a continuous session of developing. No need to keep confirming new keys in Firefox or Chrome (and it's not possible to whitelist all self-signed certs in either browser).

2) Minimizes the change in behavior. Having seen pull request #35 and being unfamiliar with the community, I wanted to make sure that the plugin continued to behave the same by default. While I would prefer the keystore remain consistent until a 'clean,' I recognize others may not and made this opt-in.