开发者

Grails War and deploy

I am using grails 1.3.4 on windo开发者_如何学运维ws xp and centos. Tomcat 5 on centos.

I do a 'grails dev war' and 'grails prod war' on an app (as well as a test app I've put together). I take the war file on xp and expand it in another dir. On the centos I can put the war file in tomcat and also in it's own dir. But when I go to run-war or run-app the unpacked war files, I am told my app is pre-0.5 grails. I do a grails upgrade. But then when I go to run-app or run-war again I get 0 domains 0 controllers and nothing is available.

My app before I war the files is 1.3.4 and it's runs, passes tests and full functions, but not once I war it. Any ideas?


You can't use run-app or run-war on unpacked war files. Both are meant to be used from the source project itself. run-app runs directly with an embedded Tomcat (or Jetty if you switch to that plugin) and run-war builds a war and deploys it into an embedded Tomcat.

When you build a war (whether you unpack it or not) it's to be used by Tomcat or another servlet container directly, not as a 'Grails war' but as a war like any other.

Basically your options are:

  • 'grails run-app' from the project root to test in dev mode
  • 'grails prod run-war' from the project root to test a war in prod mode
  • 'grails war' to deploy to a standalone container and run as a deployed application


If you are using datasource check that your username and password are correct for database connections

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜