views:

32

answers:

1

Hi, I am using grails 1.3.4 on windows 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?

+1  A: 

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
Burt Beckwith