My application is accessing gmail. Their oauth client (google-oauth-client-jetty) uses v8.2 of Jetty. Cuba Uberjar deploys v9.4. Unfortunately, there was an API change between the two (Connector.setHost no longer exists).
Is there a way I can downgrade the jetty server that Cuba installs?
Only other options I can see are:
- Download source to google-oauth-client-jetty and upgrade for 9.4
- Deploy as a WAR file instead of an UberJar, which requires me to put up a web server.
What do you suggest?
Unfortunately, there is no way to change the Jetty version for an Uber Jar (it’s hardcoded).
A possible solution to the problem would be updating google-oauth-client-jetty to 9.4 and use your own version of google-oauth-client-jetty.
Yes, I did that. I’m now trying to contribute the change, but it appears there are many projects all dependent on the same version of jetty. They are checking to see if it is even possible. Otherwise we may have to rewrite with basic Java HttpServer.
You can download Jetty binary distribution of the specific version and launch WAR file on it.
Deployment example is presented in the manual: WAR deployment to Jetty - CUBA Platform. Developer’s Manual
Thanks. But, of course, if I’m deploying a WAR file it can be on any appropriate server. I find it easier with an UberJar. One less piece of software to configure and run.