It looks like the war of a grails app that gets deployed to cloud foundry from STS has the environment set to development. How do I get it set to production?
It looks like the war of a grails app that gets deployed to cloud foundry from STS has the environment set to development. How do I get it set to production?
Right click on your project and go to "properties >> Grails >> Run on server". You should be able to change the grails environment for the run on server functionality there.
Kris
Kris De Volder -- SpringSource
I assume that's a global change. Normally I want the environment to be dev. When you do grails war, the environment is set to prod. But deploying to CF, the war is made automatically, but the environment is dev instead of prod. Any way to make a change just for deployment vs. globally?
When you change that property on the "Run on server" properties page, this will only apply for deploying to TcServer or cloudfoundry.
I.e. it is the environment used for the war command used by the run on server functionality.
I don't think it will affect the env for running it with "run-app".
Hopefully this is how you wanted it :-)
Kris
Kris De Volder -- SpringSource
Perfect! Thanks!
Your comments do make me question whether we have chosen the wrong default "dev" for the "run on server" environment.
Maybe "prod" would be a more logical default.
My thinking at the time was that I thought it most logical if doing "run as >> run-app" or "run as >> run on server" behave as much as possible in the same way (unless user explicitly overrides the deployment env).
Maybe that isn't a good way of thinking however. Perhaps as a user you would really expect the env for the war command to be prod anyway. So you would expect the behavior to be different?
Kris
Kris De Volder -- SpringSource
Yes, I think prod should be the default. I didn't really even know there where 2 different things. (I've been using NetBeans and just recently stated using STS.)
Anyway, since "run on server" creates a war, I was expecting to behave like grails war, which sets the environment to prod.