File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
src/commons/org/codehaus/groovy/grails Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,11 @@ DEFAULT_J5_DEPS = [
9090 " ejb3-persistence.jar" ,
9191]
9292
93+ target (configureRunningScript :" Sets the currently running script, in case called directly" ) {
94+ System . setProperty(' current.gant.script' ," war" )
95+ }
9396target (war : " The implementation target" ) {
94- depends( clean, packageApp)
97+ depends( configureRunningScript, clean, packageApp)
9598
9699 try {
97100 stagingDir = " ${ basedir} /staging"
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ Grails home is set to: ${grailsHome}
143143 private static setDefaultEnvironment (args ) {
144144 if (! System . properties. " ${ GrailsApplication.ENVIRONMENT} " ) {
145145 def environment = DEFAULT_ENVS [args. toLowerCase()]
146- environment = environment ? ENV_ARGS [environment] : ENV_ARGS [ ' dev ' ]
146+ environment = environment ?: GrailsApplication . ENV_DEVELOPMENT
147147 System . setProperty(GrailsApplication . ENVIRONMENT , environment )
148148 System . setProperty(GrailsApplication . ENVIRONMENT_DEFAULT , " true" )
149149 }
Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ public interface GrailsApplication extends ApplicationContextAware {
7373 * Constant used to resolve the environment via System.getProperty(ENVIRONMENT)
7474 */
7575 String ENVIRONMENT = "grails.env" ;
76+
77+ /**
78+ * Constants that indicates whether this GrailsApplication is running in the default environment
79+ */
80+ String ENVIRONMENT_DEFAULT = "grails.env.default" ;
81+
7682 /**
7783 * Constant for the development environment
7884 */
You can’t perform that action at this time.
0 commit comments