build.gradle - Put in right voodoo to allow for updates to local Maven repository (just issue gradlew.bat install) as well as a remote Maven repository. Also put in the arguments for the wrapper task.

CBLAcceptor.java - This is an extension of the TJWS acceptor class (used to handle transports like SSL) that exposes a 'getPort()' method. we need this to discover the port when we submit a port of 0 (meaning - get whatever port is available).

CBLHTTPServer.java - Changed the constructor to include server and listener as well as to take TJWS config properties and a CBLRequestAuthorization. Also put in a method to query the port the server is listening on.

CBLHTTPServlet.java - Put in logic to pass through a CBLRequestAuthorization and also to check if a connection is over SSL and if so to call setSSLSession on the connection object.

CBLListener.java - Got rid of discoverEmptyPort (we don't need it anymore now that we support port 0) and got rid of serverStatus.

CBLSSLAcceptor.java - Extends TJWS SSLAcceptor to expose getPort and also to hook it into ARG_PORT, it internally uses a differen value for ARG_PORT, see comments for details.

CBLSimpleAcceptor.java - Unfortunately the code I needed in the non-HTTPS acceptor isn't properly exposed by TJWS so I had to copy over the source for the acceptor and edit it. Bummer.