Using the gradle tomcat plugin
21,533
if you have set up everything right
go to your root directory (your build.gradle file should lie there), then execute
gradle tasks
and you should see tomcats different tasks
- tomcatRun: Starts a Tomcat instance and deploys the exploded web application to it.
- tomcatRunWar: Starts a Tomcat instance and deploys the WAR to it.
- tomcatStop: Stops the Tomcat instance.
- tomcatJasper: Runs the JSP compiler (Jasper) and turns JSP pages into Java source using.
and then you just run it
gradle tomcatRunWar
myself I prefer jetty plugin
Author by
sc_ray
Updated on July 09, 2022Comments
-
sc_ray almost 2 years
I am trying to fiddle with the gradle-tomcat-plugin and I am having some issues with some of the preliminaries. Assuming that my WAR is present in one of my folders, what do I need to do in order to run the war in an embedded tomcat using gradles tomcat plugin? The readme mentions the
tomcatRunWar
but I am a little lost as to how to use it in my gradle fileAny help would be appreciated.
Thanks