Force plugin to use new JVM (e.g. no daemon)

I’m new to Gradle and have run into a problem with the Tomcat Gradle plugin ( that I’m trying to workaround. Within a Gradle daemon process, I’m able to start Tomcat using this plugin only once. The second time, I run into the stack trace below.

Is there a setting/config option to force the tomcatRun task within this plugin to create a new JVM rather than using the Gradle daemon? I could disable the daemon completely or use the command line flag, --no-daemon, but neither is ideal.



Caused by: java.lang.Error: factory already defined
at java.base/
at org.apache.catalina.webresources.TomcatURLStreamHandlerFactory.(
at org.apache.catalina.webresources.TomcatURLStreamHandlerFactory.getInstanceInternal(
at org.apache.catalina.webresources.TomcatURLStreamHandlerFactory.register(
at org.apache.catalina.webresources.StandardRoot.registerURLStreamHandlerFactory(
at org.apache.catalina.webresources.StandardRoot.initInternal(
at org.apache.catalina.util.LifecycleBase.init(
… 175 more