Gretty configuration to specify ServletContainerVersion to be used

(Mohan Kornipati) #1

Hi All, We started evaluating Gretty ( plugin for our projects and I am looking to see if we have any [Gretty Configuration]( to specify the Tomcat Version / ServletContainerVersion like ‘8.0.26’ for ‘tomcat8’ along with ServletContainer as ‘tomcat8’ or ‘jetty9’

if I understand correct, looks like, Gretty seems to has fixed container versions based on ServletContainer - tomcat7, tomcat8, jetty9 and etc… Do we know if got any ways to set this?


(Benjamin Muschko) #2

I’d suggest you open an issue on the GitHub page of the plugin directly? The maintainer of the plugin is committed to fix issues and release a new version soon.

@Andrey_Hihlovskiy Could you please follow up on this issue?

(Andrey Hihlovskiy) #3

@mkornipati, did you open new issue for this?

(Mohan Kornipati) #4

@Andrey_Hihlovskiy @bmuschko here it is

And as workaround, we are following below approach

   def forceTomcatVersion(project, tomcatVersion) {
        def forceTomcatModules =  ["org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}",
	        project.configurations.grettyRunnerTomcat8.resolutionStrategy.forcedModules = forceTomcatModules
        } else {
			project.configurations.grettyRunnerTomcat7.resolutionStrategy.forcedModules = forceTomcatModules

(Andrey Hihlovskiy) #5

Thank you for useful piece of code.
I’ll try to implement explicit control over servlet container versions in the coming Gretty 1.4.2 release (due date 01.03.2017).