-1

I'm running grails prod war to create my app's .war file. The problem is, I need to somehow set a system property that can be accessed in grails-app/conf/Config.groovy when that .war is being built.

How can I do this? Grails version 2.1.0

Ian Roberts
  • 120,891
  • 16
  • 170
  • 183
Madbreaks
  • 19,094
  • 7
  • 58
  • 72

2 Answers2

1

You need to set this property when the war is being launched, not when it's being built. If the app is being hosted by Tomcat (or similar) you would typically adds this as a parameter to the java command that launches Tomcat.

Dónal
  • 185,044
  • 174
  • 569
  • 824
  • Thanks, but I know how to provide system properties when the app is being launched. I'm asking if there's a way to do so when the app is being compiled. – Madbreaks May 22 '14 at 22:56
0
grails -Dproperty=value prod war
verglor
  • 616
  • 7
  • 21
  • Could you please [edit] in an explanation of why this command answers the question? Code-only answers are [discouraged](http://meta.stackexchange.com/q/148272/274165), because they don't teach the solution. – Nathan Tuggy Nov 14 '15 at 00:46