开发者

Grails + Tomcat6 + Multiple Instances + Shared Lib Folder

I've got a Tomcat6 server that runs multiple Instances for two separate grail apps. When I compile my WAR file for deployment normally

run-app -Dgrails.env=production war test.war

It deploys correctly and everything works as it is suppose too. The problem is, I don't want the JAR files included in my WAR.

So I use the following command line instead

run-app -Dgrails.env=production war test.war --nojars

Now when my grails app deploys (it doesn't) I get a java.lang.NoSuchMethodError

I have copied the lib folder (from my initial test.war) to the following locations

${catalina.base}/shared/lib
${catalina.home}/shared/lib
${catalina.home}/lib

None of these work.

My catalina.properties all point to the correct locations.

开发者_如何学Go

Any ideas?


A few ideas:

  1. BuildConfig.groovy has inherits global, which has the app inherit all of the grails/plugins dependencies. If you change this, it may affect both your build and packaging - plus I have yet to encounter any documentation on what type of other things you can do with the inherits DSL

  2. Grails deployment documentation suggests there is a way to customize which dependencies make it into the war file: http://grails.org/doc/latest/guide/17.%20Deployment.html

  3. Event hooks give you access to provide a closure routine into various stages of the grails lifecycle. Can it strip out framework jars from the final war? Haven't tried that either - only using it to re-write various config files for additional envrionment configuration. However it does look like packaging events are exposed to this API:

http://grails.org/doc/latest/guide/4.%20The%20Command%20Line.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜