I’m want to change the default org.grails.plugins.tomcat.TomcatServerFactory
user by grails run-app with a mine implementation but I was not able to do it.
Looking at source (grails 2.0.4) i see in run-app script
grails-core/scripts/_GrailsRun.groovy
93 String defaultServer = "org.grails.plugins.tomcat.TomcatServerFactory"
94 def containerClass = getPropertyValue("grails.server.factory", defaultServer)
I have tried to set grails.server.factory with mine class but it simply seems ignored by grails.
I have tested putting the configurazione in BuildConfing or passing it with -D running grails but without success.
What’s my mistake?
Thank you
The problem is that the Tomcat plugin forces the value after yours is read from the commandline in its
scripts/_Events.groovyYou can get it to work by setting it in an event handler that fires after the Tomcat plugin’s, but before it’s used, e.g.
If you want to keep it dynamic you could set its value to your own system property, e.g.
and change the run-app call to