0

I am currently using the following gretty configuration in build.gradle:

gretty {
  servletContainer = 'jetty9'
}

I want to upgrade the jetty version to 9.4.8. From a quick search I found that jetty9 stands for the version Jetty 9.2.22.v20170606 (from: http://akhikhl.github.io/gretty-doc/Switching-between-servlet-containers.html). I couldn't anything on how to upgrade to jetty version 9.4.8. Could someone please help.

Susanna M
  • 93
  • 3
  • 13

1 Answers1

1

Yeah, from this doc, you can configure gretty to use 'jetty9.4' (jdk 8 only) instead of jetty9.

In the latest v2.0.0 release, plugin will work with jetty9 of 9.2.22.v20170606 and jetty9.4 of v9.4.6.v20170531, respectively.(ref)

jetty9_version=9.2.22.v20170606
jetty94_version=9.4.6.v20170531

You can PR for jetty94_version.

[updated]

I have created a sample project using Spring MVC with Jetty 9.4.8 particularly in this commit.

[edit note]

Please use 'jetty9.4' (instead of 'jetty94') - Refer to this github comment for more info

Milli
  • 1,351
  • 15
  • 19
chenrui
  • 8,910
  • 3
  • 33
  • 43
  • jetty94 is version 9.4.6. I have a requirement to upgrade to 9.4.8. is that not possible.. – Susanna M Apr 06 '18 at 09:16
  • You can use artifact host like Nexus to host your own fork of the plugin, then you can update properties and push a new version there. – chenrui Apr 06 '18 at 12:07
  • Another solution is to PR the version properties and go with the official plugin release (this may take some time) – chenrui Apr 06 '18 at 12:07
  • i tried giving servletContainer='jetty9.4' in build.gradle and overridden the property in gradle.properties jetty94Version=9.4.8.v20171121. It gave me the error 'Unsupported servlet container: jetty9.4'...So I kept servletContainer='jetty9' and added the property jetty9Version=9.4.8.v20171121... is this okay..will it pick up the 9.4 version given in gradle.properties? – Susanna M Apr 09 '18 at 05:16
  • you cannot override the gradle.properties to inject the new version, that has to come from the plugin itself. – chenrui Apr 09 '18 at 14:48
  • tried that because this page says so: http://akhikhl.github.io/gretty-doc/Overriding-servlet-container-versions.html – Susanna M Apr 10 '18 at 10:47
  • @SusannaM Please check with my sample setup in this commit, https://github.com/chenrui333/so-49671719/commit/669ef06f400869bd7061d9143e3cd7c6be3b2714 – chenrui Apr 10 '18 at 16:40
  • Above was helpful. Could you please post it as an answer so that i Could accept it – Susanna M Apr 24 '18 at 07:12