Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added the ability to add arguments with leading "-" for auto-test so …

…that functional tests could do -inline for running over and over again. Added grails wrapper. Upgraded to Grails 2.1.1.
  • Loading branch information...
commit e7b7f5fe7a064a3e5445627606ca92456696a9c2 1 parent 473fd06
authored November 15, 2012
8  application.properties
... ...
@@ -1,2 +1,6 @@
1  
-app.grails.version=2.0.0
2  
-app.name=AutoTest
  1
+#Grails Metadata file
  2
+#Thu Nov 15 15:48:39 PST 2012
  3
+app.grails.version=2.1.1
  4
+app.name=AutoTest
  5
+plugins.hibernate=2.1.1
  6
+plugins.tomcat=2.1.1
335  grailsw
... ...
@@ -0,0 +1,335 @@
  1
+##############################################################################
  2
+##                                                                          ##
  3
+##  Grails JVM Bootstrap for UN*X                                           ##
  4
+##                                                                          ##
  5
+##############################################################################
  6
+
  7
+PROGNAME=`basename "$0"`
  8
+DIRNAME=`dirname "$0"`
  9
+
  10
+# Use the maximum available, or set MAX_FD != -1 to use that
  11
+MAX_FD="maximum"
  12
+
  13
+warn() {
  14
+    echo "${PROGNAME}: $*"
  15
+}
  16
+
  17
+die() {
  18
+    warn "$*"
  19
+    exit 1
  20
+}
  21
+
  22
+earlyInit() {
  23
+	return
  24
+}
  25
+lateInit() {
  26
+	return
  27
+}
  28
+
  29
+GROOVY_STARTUP=~/.groovy/startup
  30
+if [ -r "$GROOVY_STARTUP" ]; then
  31
+	. "$GROOVY_STARTUP"
  32
+fi
  33
+
  34
+earlyInit
  35
+
  36
+# OS specific support (must be 'true' or 'false').
  37
+cygwin=false;
  38
+darwin=false;
  39
+case "`uname`" in
  40
+    CYGWIN*)
  41
+        cygwin=true
  42
+        ;;
  43
+
  44
+    Darwin*)
  45
+        darwin=true
  46
+        ;;
  47
+esac
  48
+
  49
+# Attempt to set JAVA_HOME if it's not already set
  50
+if [ -z "$JAVA_HOME" ]; then
  51
+
  52
+	# Set JAVA_HOME for Darwin
  53
+	if $darwin; then
  54
+
  55
+		[ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] &&
  56
+			export JAVA_HOME="/Library/Java/Home"
  57
+
  58
+		[ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] &&
  59
+			export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
  60
+
  61
+	fi
  62
+
  63
+fi
  64
+
  65
+# For Cygwin, ensure paths are in UNIX format before anything is touched
  66
+if $cygwin ; then
  67
+    [ -n "$GRAILS_HOME" ] &&
  68
+        GRAILS_HOME=`cygpath --unix "$GRAILS_HOME"`
  69
+    [ -n "$JAVACMD" ] &&
  70
+        JAVACMD=`cygpath --unix "$JAVACMD"`
  71
+    [ -n "$JAVA_HOME" ] &&
  72
+        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  73
+    [ -n "$CP" ] &&
  74
+        CP=`cygpath --path --unix "$CP"`
  75
+fi
  76
+
  77
+# Remove possible trailing slash (after possible cygwin correction)
  78
+GRAILS_HOME=`echo $GRAILS_HOME | sed -e 's|/$||g'`
  79
+
  80
+# Locate GRAILS_HOME if not it is not set
  81
+if [ -z "$GRAILS_HOME" -o ! -d "$GRAILS_HOME" ] ; then
  82
+  # resolve links - $0 may be a link to groovy's home
  83
+  PRG="$0"
  84
+
  85
+  # need this for relative symlinks
  86
+  while [ -h "$PRG" ] ; do
  87
+    ls=`ls -ld "$PRG"`
  88
+    link=`expr "$ls" : '.*-> \(.*\)$'`
  89
+    if expr "$link" : '/.*' > /dev/null; then
  90
+    PRG="$link"
  91
+    else
  92
+    PRG=`dirname "$PRG"`"/$link"
  93
+    fi
  94
+  done
  95
+
  96
+  SAVED="`pwd`"
  97
+  cd "`dirname \"$PRG\"`/.."
  98
+  GRAILS_HOME="`pwd -P`"
  99
+  cd "$SAVED"
  100
+fi
  101
+
  102
+# Warn the user if JAVA_HOME and/or GRAILS_HOME are not set.
  103
+if [ -z "$JAVA_HOME" ] ; then
  104
+    die "JAVA_HOME environment variable is not set"
  105
+elif [ ! -d "$JAVA_HOME" ] ; then
  106
+    die "JAVA_HOME is not a directory: $JAVA_HOME"
  107
+fi
  108
+
  109
+if [ -z "$GRAILS_HOME" ] ; then
  110
+    warn "GRAILS_HOME environment variable is not set"
  111
+fi
  112
+
  113
+if [ ! -d "$GRAILS_HOME" ] ; then
  114
+    die "GRAILS_HOME is not a directory: $GRAILS_HOME"
  115
+fi
  116
+
  117
+# Use default groovy-conf config
  118
+if [ -z "$STARTER_CONF" ]; then
  119
+    STARTER_CONF="$GRAILS_HOME/conf/groovy-starter.conf"
  120
+fi
  121
+STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.1.1.jar:wrapper:."
  122
+
  123
+# Allow access to Cocoa classes on OS X
  124
+if $darwin; then
  125
+    STARTER_CLASSPATH="$STARTER_CLASSPATH:/System/Library/Java/Support"
  126
+fi
  127
+
  128
+# Create the final classpath
  129
+# Setting a classpath using the -cp or -classpath option means not to use
  130
+# the global classpath. Groovy behaves then the same as the java
  131
+# interpreter
  132
+if [ -n "$CP" ] ; then
  133
+    CP="$CP"
  134
+elif [ -n "$CLASSPATH" ] ; then
  135
+    CP="$CLASSPATH"
  136
+fi
  137
+
  138
+# Determine the Java command to use to start the JVM
  139
+if [ -z "$JAVACMD" ]; then
  140
+    if [ -n "$JAVA_HOME" ]; then
  141
+        if [ -x "$JAVA_HOME/jre/sh/java" ]; then
  142
+            # IBM's JDK on AIX uses strange locations for the executables
  143
+            JAVACMD="$JAVA_HOME/jre/sh/java"
  144
+        else
  145
+            JAVACMD="$JAVA_HOME/bin/java"
  146
+        fi
  147
+    else
  148
+        JAVACMD="java"
  149
+    fi
  150
+fi
  151
+if [ ! -x "$JAVACMD" ]; then
  152
+    die "JAVA_HOME is not defined correctly; can not execute: $JAVACMD"
  153
+fi
  154
+
  155
+# Increase the maximum file descriptors if we can
  156
+if [ "$cygwin" = "false" ]; then
  157
+    MAX_FD_LIMIT=`ulimit -H -n`
  158
+	if [ "$MAX_FD_LIMIT" != "unlimited" ]; then
  159
+	    if [ $? -eq 0 ]; then
  160
+	        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
  161
+	            # use the businessSystem max
  162
+	            MAX_FD="$MAX_FD_LIMIT"
  163
+	        fi
  164
+
  165
+	        ulimit -n $MAX_FD
  166
+	        if [ $? -ne 0 ]; then
  167
+	            warn "Could not set maximum file descriptor limit: $MAX_FD"
  168
+	        fi
  169
+	    else
  170
+	        warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
  171
+	    fi
  172
+	fi
  173
+fi
  174
+
  175
+# Fix the cygwin agent issue
  176
+AGENT_GRAILS_HOME=$GRAILS_HOME
  177
+if $cygwin ; then
  178
+    [ -n "$GRAILS_HOME" ] &&
  179
+        AGENT_GRAILS_HOME=`cygpath --windows "$GRAILS_HOME"`
  180
+fi
  181
+
  182
+if [ -z "$GRAILS_AGENT_CACHE_DIR" ]; then
  183
+    GRAILS_AGENT_CACHE_DIR=~/.grails/@grails.version@/
  184
+fi
  185
+SPRINGLOADED_PARAMS="profile=grails;cacheDir=$GRAILS_AGENT_CACHE_DIR"
  186
+if [ ! -d "$GRAILS_AGENT_CACHE_DIR" ]; then
  187
+    mkdir -p $GRAILS_AGENT_CACHE_DIR
  188
+fi
  189
+
  190
+# Process JVM args
  191
+AGENT_STRING="-javaagent:wrapper/springloaded-core-1.0.6.jar -noverify  -Dspringloaded=$SPRINGLOADED_PARAMS"
  192
+CMD_LINE_ARGS=""
  193
+DISABLE_RELOADING=false
  194
+
  195
+while true; do
  196
+  if [ "$1" = "-cp" ] || [ "$1" = "-classpath" ]; then
  197
+    CP=$2
  198
+    shift 2
  199
+    break
  200
+  fi
  201
+
  202
+  if [ "$1" = "-reloading" ]; then
  203
+    AGENT=$AGENT_STRING
  204
+    shift
  205
+    break
  206
+  fi
  207
+
  208
+  if [ "$1" = "-noreloading" ]; then
  209
+    DISABLE_RELOADING=true
  210
+    shift
  211
+    break
  212
+  fi
  213
+
  214
+  if [ "$1" = "-debug" ]; then
  215
+    JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
  216
+    shift
  217
+    break
  218
+  fi
  219
+
  220
+  if [ "$1" != -* ]; then
  221
+    break
  222
+  fi
  223
+
  224
+  CMD_LINE_ARGS="$CMD_LINE_ARGS $1"
  225
+  shift
  226
+done
  227
+
  228
+# Enable agent-based reloading for the 'run-app' command.
  229
+if ! $DISABLE_RELOADING; then
  230
+    for a in "$@"; do
  231
+        if [ "$a" = "run-app" ]; then
  232
+            AGENT=$AGENT_STRING
  233
+        fi
  234
+    done
  235
+
  236
+    if [ $# = 0 ]; then
  237
+        AGENT=$AGENT_STRING
  238
+    fi
  239
+fi
  240
+
  241
+ARGUMENTS="$CMD_LINE_ARGS $@"
  242
+
  243
+# Setup Profiler
  244
+useprofiler=false
  245
+if [ "x$PROFILER" != "x" ]; then
  246
+    if [ -r "$PROFILER" ]; then
  247
+        . $PROFILER
  248
+        useprofiler=true
  249
+    else
  250
+        die "Profiler file not found: $PROFILER"
  251
+    fi
  252
+fi
  253
+
  254
+# For Darwin, use classes.jar for TOOLS_JAR
  255
+TOOLS_JAR="$JAVA_HOME/lib/tools.jar"
  256
+if $darwin; then
  257
+    JAVA_OPTS="-Xdock:name=Grails -Xdock:icon=$GRAILS_HOME/media/icons/grails.icns $JAVA_OPTS"
  258
+#   TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
  259
+fi
  260
+
  261
+# For Cygwin, switch paths to Windows format before running java
  262
+if $cygwin; then
  263
+    GRAILS_HOME=`cygpath --path --mixed "$GRAILS_HOME"`
  264
+    JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
  265
+    STARTER_CONF=`cygpath --path --mixed "$STARTER_CONF"`
  266
+    CP=`cygpath --path --mixed "$CP"`
  267
+    TOOLS_JAR=`cygpath --path --mixed "$TOOLS_JAR"`
  268
+    STARTER_CLASSPATH=`cygpath --path --mixed "$STARTER_CLASSPATH"`
  269
+	# We build the pattern for arguments to be converted via cygpath
  270
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
  271
+    SEP=""
  272
+    for dir in $ROOTDIRSRAW; do
  273
+    	ROOTDIRS="$ROOTDIRS$SEP$dir"
  274
+	    SEP="|"
  275
+    done
  276
+    OURCYGPATTERN="(^($ROOTDIRS))"
  277
+    # Add a user-defined pattern to the cygpath arguments
  278
+    if [ "$GROOVY_CYGPATTERN" != "" ] ; then
  279
+    	OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)"
  280
+    fi
  281
+    # Now convert the arguments
  282
+	ARGUMENTS=""
  283
+    for arg in "$@" ; do
  284
+    	CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
  285
+    	if [ $CHECK -ne 0 ] ; then
  286
+	    	convArg=`cygpath --path --ignore --mixed "$arg"`
  287
+    	else
  288
+			convArg=$arg
  289
+    	fi
  290
+		ARGUMENTS="$ARGUMENTS $convArg"
  291
+    done
  292
+fi
  293
+
  294
+STARTER_MAIN_CLASS=org.grails.wrapper.GrailsWrapper
  295
+
  296
+lateInit
  297
+
  298
+startGrails() {
  299
+  CLASS=$1
  300
+  shift
  301
+  if [ -n "$GRAILS_OPTS" ]
  302
+     then
  303
+ 	GRAILS_OPTS="$GRAILS_OPTS"
  304
+     else
  305
+	GRAILS_OPTS="-server -Xmx768M -Xms768M -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8"
  306
+  fi
  307
+  JAVA_OPTS="$GRAILS_OPTS $JAVA_OPTS $AGENT"
  308
+  # Start the Profiler or the JVM
  309
+  if $useprofiler; then
  310
+      runProfiler
  311
+  else
  312
+  	if [ $# -eq 0 ] ; then         # no argument given
  313
+         exec "$JAVACMD" $JAVA_OPTS \
  314
+          -classpath "$STARTER_CLASSPATH" \
  315
+          -Dgrails.home="$GRAILS_HOME" \
  316
+          -Dtools.jar="$TOOLS_JAR" \
  317
+          $STARTER_MAIN_CLASS \
  318
+          --main $CLASS \
  319
+          --conf "$STARTER_CONF" \
  320
+          --classpath "$CP"
  321
+  	else
  322
+         exec "$JAVACMD" $JAVA_OPTS \
  323
+          -classpath "$STARTER_CLASSPATH" \
  324
+          -Dgrails.home="$GRAILS_HOME" \
  325
+          -Dtools.jar="$TOOLS_JAR" \
  326
+          $STARTER_MAIN_CLASS \
  327
+          --main $CLASS \
  328
+          --conf "$STARTER_CONF" \
  329
+          --classpath "$CP" \
  330
+          "${ARGUMENTS}"
  331
+  	fi
  332
+  fi
  333
+}
  334
+
  335
+startGrails $STARTER_MAIN_CLASS "$@"
177  grailsw.bat
... ...
@@ -0,0 +1,177 @@
  1
+@if "%DEBUG%" == "" @echo off
  2
+@rem ##########################################################################
  3
+@rem                                                                         ##
  4
+@rem  Grails JVM Bootstrap for Windows                                       ##
  5
+@rem                                                                         ##
  6
+@rem ##########################################################################
  7
+
  8
+@rem Set local scope for the variables with windows NT shell
  9
+if "%OS%"=="Windows_NT" setlocal
  10
+
  11
+set CLASS=org.grails.wrapper.GrailsWrapper
  12
+
  13
+if exist "%USERPROFILE%/.groovy/preinit.bat" call "%USERPROFILE%/.groovy/preinit.bat"
  14
+
  15
+@rem Determine the command interpreter to execute the "CD" later
  16
+set COMMAND_COM="cmd.exe"
  17
+if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
  18
+if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
  19
+
  20
+@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
  21
+set FIND_EXE="find.exe"
  22
+if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
  23
+if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
  24
+
  25
+:check_JAVA_HOME
  26
+@rem Make sure we have a valid JAVA_HOME
  27
+if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
  28
+
  29
+echo.
  30
+echo ERROR: Environment variable JAVA_HOME has not been set.
  31
+echo.
  32
+echo Please set the JAVA_HOME variable in your environment to match the
  33
+echo location of your Java installation.
  34
+echo.
  35
+goto end
  36
+
  37
+:have_JAVA_HOME
  38
+@rem Remove trailing slash from JAVA_HOME if found
  39
+if "%JAVA_HOME:~-1%"=="\" SET JAVA_HOME=%JAVA_HOME:~0,-1%
  40
+
  41
+@rem Validate JAVA_HOME
  42
+%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
  43
+if not errorlevel 1 goto check_GRAILS_HOME
  44
+
  45
+echo.
  46
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
  47
+echo.
  48
+echo Please set the JAVA_HOME variable in your environment to match the
  49
+echo location of your Java installation.
  50
+echo.
  51
+goto end
  52
+
  53
+:check_GRAILS_HOME
  54
+@rem Define GRAILS_HOME if not set
  55
+if "%GRAILS_HOME%" == "" set GRAILS_HOME=%DIRNAME%..
  56
+
  57
+@rem Remove trailing slash from GRAILS_HOME if found
  58
+if "%GRAILS_HOME:~-1%"=="\" SET GRAILS_HOME=%GRAILS_HOME:~0,-1%
  59
+
  60
+:init
  61
+
  62
+for %%x in ("%HOMEPATH%") do set SHORTHOME=%%~fsx
  63
+if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/@grails.version@/
  64
+set SPRINGLOADED_PARAMS="profile=grails;cacheDir=%GRAILS_AGENT_CACHE_DIR%"
  65
+if not exist "%GRAILS_AGENT_CACHE_DIR%" mkdir "%GRAILS_AGENT_CACHE_DIR%"
  66
+
  67
+set AGENT_STRING=-javaagent:wrapper/springloaded-core-1.0.6.jar -noverify -Dspringloaded=%SPRINGLOADED_PARAMS%
  68
+set DISABLE_RELOADING=
  69
+if "%GRAILS_OPTS%" == "" set GRAILS_OPTS=-server -Xmx768M -Xms768M -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8
  70
+
  71
+@rem Get command-line arguments, handling Windows variants
  72
+if "%@eval[2+2]" == "4" goto 4NT_args
  73
+
  74
+@rem Slurp the command line arguments.
  75
+set CMD_LINE_ARGS=
  76
+set CP=
  77
+set INTERACTIVE=true
  78
+
  79
+:win9xME_args_slurp
  80
+if "x%~1" == "x" goto execute
  81
+set CURR_ARG=%~1
  82
+if "%CURR_ARG:~0,2%" == "-D" (
  83
+	set GRAILS_OPTS=%GRAILS_OPTS% %~1=%~2
  84
+	shift
  85
+	shift
  86
+	goto win9xME_args_slurp
  87
+)
  88
+if "x%~1" == "x-cp" (
  89
+	set CP=%~2
  90
+	shift
  91
+	shift
  92
+	goto win9xME_args_slurp
  93
+)
  94
+if "x%~1" == "x-debug" (
  95
+	set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
  96
+	shift
  97
+	goto win9xME_args_slurp
  98
+)
  99
+if "x%~1" == "x-classpath" (
  100
+	set CP=%~2
  101
+	shift
  102
+	shift
  103
+	goto win9xME_args_slurp
  104
+)
  105
+if "x%~1" == "x-reloading" (
  106
+	set AGENT=%AGENT_STRING%
  107
+	shift
  108
+	goto win9xME_args_slurp
  109
+)
  110
+if "x%~1" == "xrun-app" (
  111
+	set AGENT=%AGENT_STRING%
  112
+	set INTERACTIVE=
  113
+	set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  114
+	shift
  115
+	goto win9xME_args_slurp
  116
+)
  117
+if "x%~1" == "x-noreloading" (
  118
+	set DISABLE_RELOADING=true
  119
+	shift
  120
+	goto win9xME_args_slurp
  121
+)
  122
+set INTERACTIVE=
  123
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  124
+shift
  125
+goto win9xME_args_slurp
  126
+
  127
+:4NT_args
  128
+@rem Get arguments from the 4NT Shell from JP Software
  129
+set CMD_LINE_ARGS=%$
  130
+
  131
+:execute
  132
+@rem Setup the command line
  133
+set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.1.1.jar;wrapper;.
  134
+
  135
+if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"
  136
+
  137
+@rem Setting a classpath using the -cp or -classpath option means not to use
  138
+@rem the global classpath. Groovy behaves then the same as the java interpreter
  139
+
  140
+if "x" == "x%CLASSPATH%" goto after_classpath
  141
+set CP=%CP%;%CLASSPATH%
  142
+:after_classpath
  143
+
  144
+if "x%DISABLE_RELOADING%" == "xtrue" (
  145
+	set AGENT=
  146
+) else (
  147
+	if "x%INTERACTIVE%" == "xtrue" (
  148
+		set AGENT=%AGENT_STRING%
  149
+	)
  150
+)
  151
+
  152
+set STARTER_MAIN_CLASS=org.grails.wrapper.GrailsWrapper
  153
+set STARTER_CONF=%GRAILS_HOME%\conf\groovy-starter.conf
  154
+
  155
+set JAVA_EXE=%JAVA_HOME%\bin\java.exe
  156
+set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar
  157
+
  158
+set JAVA_OPTS=%GRAILS_OPTS% %JAVA_OPTS% %AGENT%
  159
+
  160
+set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
  161
+set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home="%GRAILS_HOME%"
  162
+set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=@grails.version@
  163
+set JAVA_OPTS=%JAVA_OPTS% -Dbase.dir=.
  164
+set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
  165
+set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"
  166
+
  167
+if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat"
  168
+
  169
+@rem Execute Grails
  170
+CALL "%JAVA_EXE%" %JAVA_OPTS% -classpath "%STARTER_CLASSPATH%" %STARTER_MAIN_CLASS% --main %CLASS% --conf "%STARTER_CONF%" --classpath "%CP%" "%CMD_LINE_ARGS%"
  171
+:end
  172
+@rem End local scope for the variables with windows NT shell
  173
+if "%OS%"=="Windows_NT" endlocal
  174
+
  175
+@rem Optional pause the batch file
  176
+if "%GROOVY_BATCH_PAUSE%" == "on" pause
  177
+
11  scripts/AutoTest.groovy
@@ -15,7 +15,14 @@ target(default: "autotest") {
15 15
     File baseProjectDirectory = new File(basedir)
16 16
     long interval = 2000
17 17
     FileListener listener = new FileListener()
18  
-    listener.args = argsMap.params
  18
+
  19
+    argsMap.each { key, value ->
  20
+        if (key == "params") {
  21
+            listener.args.addAll(value)
  22
+        } else {
  23
+            listener.args.add("-" + value)
  24
+        }
  25
+    }
19 26
 
20 27
     FileAlterationObserver observer = new FileAlterationObserver(baseProjectDirectory);
21 28
     observer.addListener(listener)
@@ -30,7 +37,7 @@ target(default: "autotest") {
30 37
 }
31 38
 class FileListener extends FileAlterationListenerAdaptor {
32 39
     Set testsToRun = []
33  
-    Set args
  40
+    Set args = []
34 41
 
35 42
     @Synchronized
36 43
     void onFileChange(File file) {
2  test/project/bookstore/application.properties
... ...
@@ -1,6 +1,6 @@
1 1
 #Grails Metadata file
2 2
 #Mon Jan 30 21:07:04 CST 2012
3  
-app.grails.version=2.0.0
  3
+app.grails.version=2.1.1
4 4
 app.name=bookstore
5 5
 app.servlet.version=2.5
6 6
 app.version=0.1
335  test/project/bookstore/grailsw
... ...
@@ -0,0 +1,335 @@
  1
+##############################################################################
  2
+##                                                                          ##
  3
+##  Grails JVM Bootstrap for UN*X                                           ##
  4
+##                                                                          ##
  5
+##############################################################################
  6
+
  7
+PROGNAME=`basename "$0"`
  8
+DIRNAME=`dirname "$0"`
  9
+
  10
+# Use the maximum available, or set MAX_FD != -1 to use that
  11
+MAX_FD="maximum"
  12
+
  13
+warn() {
  14
+    echo "${PROGNAME}: $*"
  15
+}
  16
+
  17
+die() {
  18
+    warn "$*"
  19
+    exit 1
  20
+}
  21
+
  22
+earlyInit() {
  23
+	return
  24
+}
  25
+lateInit() {
  26
+	return
  27
+}
  28
+
  29
+GROOVY_STARTUP=~/.groovy/startup
  30
+if [ -r "$GROOVY_STARTUP" ]; then
  31
+	. "$GROOVY_STARTUP"
  32
+fi
  33
+
  34
+earlyInit
  35
+
  36
+# OS specific support (must be 'true' or 'false').
  37
+cygwin=false;
  38
+darwin=false;
  39
+case "`uname`" in
  40
+    CYGWIN*)
  41
+        cygwin=true
  42
+        ;;
  43
+
  44
+    Darwin*)
  45
+        darwin=true
  46
+        ;;
  47
+esac
  48
+
  49
+# Attempt to set JAVA_HOME if it's not already set
  50
+if [ -z "$JAVA_HOME" ]; then
  51
+
  52
+	# Set JAVA_HOME for Darwin
  53
+	if $darwin; then
  54
+
  55
+		[ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] &&
  56
+			export JAVA_HOME="/Library/Java/Home"
  57
+
  58
+		[ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] &&
  59
+			export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
  60
+
  61
+	fi
  62
+
  63
+fi
  64
+
  65
+# For Cygwin, ensure paths are in UNIX format before anything is touched
  66
+if $cygwin ; then
  67
+    [ -n "$GRAILS_HOME" ] &&
  68
+        GRAILS_HOME=`cygpath --unix "$GRAILS_HOME"`
  69
+    [ -n "$JAVACMD" ] &&
  70
+        JAVACMD=`cygpath --unix "$JAVACMD"`
  71
+    [ -n "$JAVA_HOME" ] &&
  72
+        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  73
+    [ -n "$CP" ] &&
  74
+        CP=`cygpath --path --unix "$CP"`
  75
+fi
  76
+
  77
+# Remove possible trailing slash (after possible cygwin correction)
  78
+GRAILS_HOME=`echo $GRAILS_HOME | sed -e 's|/$||g'`
  79
+
  80
+# Locate GRAILS_HOME if not it is not set
  81
+if [ -z "$GRAILS_HOME" -o ! -d "$GRAILS_HOME" ] ; then
  82
+  # resolve links - $0 may be a link to groovy's home
  83
+  PRG="$0"
  84
+
  85
+  # need this for relative symlinks
  86
+  while [ -h "$PRG" ] ; do
  87
+    ls=`ls -ld "$PRG"`
  88
+    link=`expr "$ls" : '.*-> \(.*\)$'`
  89
+    if expr "$link" : '/.*' > /dev/null; then
  90
+    PRG="$link"
  91
+    else
  92
+    PRG=`dirname "$PRG"`"/$link"
  93
+    fi
  94
+  done
  95
+
  96
+  SAVED="`pwd`"
  97
+  cd "`dirname \"$PRG\"`/.."
  98
+  GRAILS_HOME="`pwd -P`"
  99
+  cd "$SAVED"
  100
+fi
  101
+
  102
+# Warn the user if JAVA_HOME and/or GRAILS_HOME are not set.
  103
+if [ -z "$JAVA_HOME" ] ; then
  104
+    die "JAVA_HOME environment variable is not set"
  105
+elif [ ! -d "$JAVA_HOME" ] ; then
  106
+    die "JAVA_HOME is not a directory: $JAVA_HOME"
  107
+fi
  108
+
  109
+if [ -z "$GRAILS_HOME" ] ; then
  110
+    warn "GRAILS_HOME environment variable is not set"
  111
+fi
  112
+
  113
+if [ ! -d "$GRAILS_HOME" ] ; then
  114
+    die "GRAILS_HOME is not a directory: $GRAILS_HOME"
  115
+fi
  116
+
  117
+# Use default groovy-conf config
  118
+if [ -z "$STARTER_CONF" ]; then
  119
+    STARTER_CONF="$GRAILS_HOME/conf/groovy-starter.conf"
  120
+fi
  121
+STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.1.1.jar:wrapper:."
  122
+
  123
+# Allow access to Cocoa classes on OS X
  124
+if $darwin; then
  125
+    STARTER_CLASSPATH="$STARTER_CLASSPATH:/System/Library/Java/Support"
  126
+fi
  127
+
  128
+# Create the final classpath
  129
+# Setting a classpath using the -cp or -classpath option means not to use
  130
+# the global classpath. Groovy behaves then the same as the java
  131
+# interpreter
  132
+if [ -n "$CP" ] ; then
  133
+    CP="$CP"
  134
+elif [ -n "$CLASSPATH" ] ; then
  135
+    CP="$CLASSPATH"
  136
+fi
  137
+
  138
+# Determine the Java command to use to start the JVM
  139
+if [ -z "$JAVACMD" ]; then
  140
+    if [ -n "$JAVA_HOME" ]; then
  141
+        if [ -x "$JAVA_HOME/jre/sh/java" ]; then
  142
+            # IBM's JDK on AIX uses strange locations for the executables
  143
+            JAVACMD="$JAVA_HOME/jre/sh/java"
  144
+        else
  145
+            JAVACMD="$JAVA_HOME/bin/java"
  146
+        fi
  147
+    else
  148
+        JAVACMD="java"
  149
+    fi
  150
+fi
  151
+if [ ! -x "$JAVACMD" ]; then
  152
+    die "JAVA_HOME is not defined correctly; can not execute: $JAVACMD"
  153
+fi
  154
+
  155
+# Increase the maximum file descriptors if we can
  156
+if [ "$cygwin" = "false" ]; then
  157
+    MAX_FD_LIMIT=`ulimit -H -n`
  158
+	if [ "$MAX_FD_LIMIT" != "unlimited" ]; then
  159
+	    if [ $? -eq 0 ]; then
  160
+	        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
  161
+	            # use the businessSystem max
  162
+	            MAX_FD="$MAX_FD_LIMIT"
  163
+	        fi
  164
+
  165
+	        ulimit -n $MAX_FD
  166
+	        if [ $? -ne 0 ]; then
  167
+	            warn "Could not set maximum file descriptor limit: $MAX_FD"
  168
+	        fi
  169
+	    else
  170
+	        warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
  171
+	    fi
  172
+	fi
  173
+fi
  174
+
  175
+# Fix the cygwin agent issue
  176
+AGENT_GRAILS_HOME=$GRAILS_HOME
  177
+if $cygwin ; then
  178
+    [ -n "$GRAILS_HOME" ] &&
  179
+        AGENT_GRAILS_HOME=`cygpath --windows "$GRAILS_HOME"`
  180
+fi
  181
+
  182
+if [ -z "$GRAILS_AGENT_CACHE_DIR" ]; then
  183
+    GRAILS_AGENT_CACHE_DIR=~/.grails/@grails.version@/
  184
+fi
  185
+SPRINGLOADED_PARAMS="profile=grails;cacheDir=$GRAILS_AGENT_CACHE_DIR"
  186
+if [ ! -d "$GRAILS_AGENT_CACHE_DIR" ]; then
  187
+    mkdir -p $GRAILS_AGENT_CACHE_DIR
  188
+fi
  189
+
  190
+# Process JVM args
  191
+AGENT_STRING="-javaagent:wrapper/springloaded-core-1.0.6.jar -noverify  -Dspringloaded=$SPRINGLOADED_PARAMS"
  192
+CMD_LINE_ARGS=""
  193
+DISABLE_RELOADING=false
  194
+
  195
+while true; do
  196
+  if [ "$1" = "-cp" ] || [ "$1" = "-classpath" ]; then
  197
+    CP=$2
  198
+    shift 2
  199
+    break
  200
+  fi
  201
+
  202
+  if [ "$1" = "-reloading" ]; then
  203
+    AGENT=$AGENT_STRING
  204
+    shift
  205
+    break
  206
+  fi
  207
+
  208
+  if [ "$1" = "-noreloading" ]; then
  209
+    DISABLE_RELOADING=true
  210
+    shift
  211
+    break
  212
+  fi
  213
+
  214
+  if [ "$1" = "-debug" ]; then
  215
+    JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
  216
+    shift
  217
+    break
  218
+  fi
  219
+
  220
+  if [ "$1" != -* ]; then
  221
+    break
  222
+  fi
  223
+
  224
+  CMD_LINE_ARGS="$CMD_LINE_ARGS $1"
  225
+  shift
  226
+done
  227
+
  228
+# Enable agent-based reloading for the 'run-app' command.
  229
+if ! $DISABLE_RELOADING; then
  230
+    for a in "$@"; do
  231
+        if [ "$a" = "run-app" ]; then
  232
+            AGENT=$AGENT_STRING
  233
+        fi
  234
+    done
  235
+
  236
+    if [ $# = 0 ]; then
  237
+        AGENT=$AGENT_STRING
  238
+    fi
  239
+fi
  240
+
  241
+ARGUMENTS="$CMD_LINE_ARGS $@"
  242
+
  243
+# Setup Profiler
  244
+useprofiler=false
  245
+if [ "x$PROFILER" != "x" ]; then
  246
+    if [ -r "$PROFILER" ]; then
  247
+        . $PROFILER
  248
+        useprofiler=true
  249
+    else
  250
+        die "Profiler file not found: $PROFILER"
  251
+    fi
  252
+fi
  253
+
  254
+# For Darwin, use classes.jar for TOOLS_JAR
  255
+TOOLS_JAR="$JAVA_HOME/lib/tools.jar"
  256
+if $darwin; then
  257
+    JAVA_OPTS="-Xdock:name=Grails -Xdock:icon=$GRAILS_HOME/media/icons/grails.icns $JAVA_OPTS"
  258
+#   TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
  259
+fi
  260
+
  261
+# For Cygwin, switch paths to Windows format before running java
  262
+if $cygwin; then
  263
+    GRAILS_HOME=`cygpath --path --mixed "$GRAILS_HOME"`
  264
+    JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
  265
+    STARTER_CONF=`cygpath --path --mixed "$STARTER_CONF"`
  266
+    CP=`cygpath --path --mixed "$CP"`
  267
+    TOOLS_JAR=`cygpath --path --mixed "$TOOLS_JAR"`
  268
+    STARTER_CLASSPATH=`cygpath --path --mixed "$STARTER_CLASSPATH"`
  269
+	# We build the pattern for arguments to be converted via cygpath
  270
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
  271
+    SEP=""
  272
+    for dir in $ROOTDIRSRAW; do
  273
+    	ROOTDIRS="$ROOTDIRS$SEP$dir"
  274
+	    SEP="|"
  275
+    done
  276
+    OURCYGPATTERN="(^($ROOTDIRS))"
  277
+    # Add a user-defined pattern to the cygpath arguments
  278
+    if [ "$GROOVY_CYGPATTERN" != "" ] ; then
  279
+    	OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)"
  280
+    fi
  281
+    # Now convert the arguments
  282
+	ARGUMENTS=""
  283
+    for arg in "$@" ; do
  284
+    	CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
  285
+    	if [ $CHECK -ne 0 ] ; then
  286
+	    	convArg=`cygpath --path --ignore --mixed "$arg"`
  287
+    	else
  288
+			convArg=$arg
  289
+    	fi
  290
+		ARGUMENTS="$ARGUMENTS $convArg"
  291
+    done
  292
+fi
  293
+
  294
+STARTER_MAIN_CLASS=org.grails.wrapper.GrailsWrapper
  295
+
  296
+lateInit
  297
+
  298
+startGrails() {
  299
+  CLASS=$1
  300
+  shift
  301
+  if [ -n "$GRAILS_OPTS" ]
  302
+     then
  303
+ 	GRAILS_OPTS="$GRAILS_OPTS"
  304
+     else
  305
+	GRAILS_OPTS="-server -Xmx768M -Xms768M -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8"
  306
+  fi
  307
+  JAVA_OPTS="$GRAILS_OPTS $JAVA_OPTS $AGENT"
  308
+  # Start the Profiler or the JVM
  309
+  if $useprofiler; then
  310
+      runProfiler
  311
+  else
  312
+  	if [ $# -eq 0 ] ; then         # no argument given
  313
+         exec "$JAVACMD" $JAVA_OPTS \
  314
+          -classpath "$STARTER_CLASSPATH" \
  315
+          -Dgrails.home="$GRAILS_HOME" \
  316
+          -Dtools.jar="$TOOLS_JAR" \
  317
+          $STARTER_MAIN_CLASS \
  318
+          --main $CLASS \
  319
+          --conf "$STARTER_CONF" \
  320
+          --classpath "$CP"
  321
+  	else
  322
+         exec "$JAVACMD" $JAVA_OPTS \
  323
+          -classpath "$STARTER_CLASSPATH" \
  324
+          -Dgrails.home="$GRAILS_HOME" \
  325
+          -Dtools.jar="$TOOLS_JAR" \
  326
+          $STARTER_MAIN_CLASS \
  327
+          --main $CLASS \
  328
+          --conf "$STARTER_CONF" \
  329
+          --classpath "$CP" \
  330
+          "${ARGUMENTS}"
  331
+  	fi
  332
+  fi
  333
+}
  334
+
  335
+startGrails $STARTER_MAIN_CLASS "$@"
177  test/project/bookstore/grailsw.bat
... ...
@@ -0,0 +1,177 @@
  1
+@if "%DEBUG%" == "" @echo off
  2
+@rem ##########################################################################
  3
+@rem                                                                         ##
  4
+@rem  Grails JVM Bootstrap for Windows                                       ##
  5
+@rem                                                                         ##
  6
+@rem ##########################################################################
  7
+
  8
+@rem Set local scope for the variables with windows NT shell
  9
+if "%OS%"=="Windows_NT" setlocal
  10
+
  11
+set CLASS=org.grails.wrapper.GrailsWrapper
  12
+
  13
+if exist "%USERPROFILE%/.groovy/preinit.bat" call "%USERPROFILE%/.groovy/preinit.bat"
  14
+
  15
+@rem Determine the command interpreter to execute the "CD" later
  16
+set COMMAND_COM="cmd.exe"
  17
+if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
  18
+if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
  19
+
  20
+@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
  21
+set FIND_EXE="find.exe"
  22
+if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
  23
+if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
  24
+
  25
+:check_JAVA_HOME
  26
+@rem Make sure we have a valid JAVA_HOME
  27
+if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
  28
+
  29
+echo.
  30
+echo ERROR: Environment variable JAVA_HOME has not been set.
  31
+echo.
  32
+echo Please set the JAVA_HOME variable in your environment to match the
  33
+echo location of your Java installation.
  34
+echo.
  35
+goto end
  36
+
  37
+:have_JAVA_HOME
  38
+@rem Remove trailing slash from JAVA_HOME if found
  39
+if "%JAVA_HOME:~-1%"=="\" SET JAVA_HOME=%JAVA_HOME:~0,-1%
  40
+
  41
+@rem Validate JAVA_HOME
  42
+%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
  43
+if not errorlevel 1 goto check_GRAILS_HOME
  44
+
  45
+echo.
  46
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
  47
+echo.
  48
+echo Please set the JAVA_HOME variable in your environment to match the
  49
+echo location of your Java installation.
  50
+echo.
  51
+goto end
  52
+
  53
+:check_GRAILS_HOME
  54
+@rem Define GRAILS_HOME if not set
  55
+if "%GRAILS_HOME%" == "" set GRAILS_HOME=%DIRNAME%..
  56
+
  57
+@rem Remove trailing slash from GRAILS_HOME if found
  58
+if "%GRAILS_HOME:~-1%"=="\" SET GRAILS_HOME=%GRAILS_HOME:~0,-1%
  59
+
  60
+:init
  61
+
  62
+for %%x in ("%HOMEPATH%") do set SHORTHOME=%%~fsx
  63
+if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/@grails.version@/
  64
+set SPRINGLOADED_PARAMS="profile=grails;cacheDir=%GRAILS_AGENT_CACHE_DIR%"
  65
+if not exist "%GRAILS_AGENT_CACHE_DIR%" mkdir "%GRAILS_AGENT_CACHE_DIR%"
  66
+
  67
+set AGENT_STRING=-javaagent:wrapper/springloaded-core-1.0.6.jar -noverify -Dspringloaded=%SPRINGLOADED_PARAMS%
  68
+set DISABLE_RELOADING=
  69
+if "%GRAILS_OPTS%" == "" set GRAILS_OPTS=-server -Xmx768M -Xms768M -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8
  70
+
  71
+@rem Get command-line arguments, handling Windows variants
  72
+if "%@eval[2+2]" == "4" goto 4NT_args
  73
+
  74
+@rem Slurp the command line arguments.
  75
+set CMD_LINE_ARGS=
  76
+set CP=
  77
+set INTERACTIVE=true
  78
+
  79
+:win9xME_args_slurp
  80
+if "x%~1" == "x" goto execute
  81
+set CURR_ARG=%~1
  82
+if "%CURR_ARG:~0,2%" == "-D" (
  83
+	set GRAILS_OPTS=%GRAILS_OPTS% %~1=%~2
  84
+	shift
  85
+	shift
  86
+	goto win9xME_args_slurp
  87
+)
  88
+if "x%~1" == "x-cp" (
  89
+	set CP=%~2
  90
+	shift
  91
+	shift
  92
+	goto win9xME_args_slurp
  93
+)
  94
+if "x%~1" == "x-debug" (
  95
+	set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
  96
+	shift
  97
+	goto win9xME_args_slurp
  98
+)
  99
+if "x%~1" == "x-classpath" (
  100
+	set CP=%~2
  101
+	shift
  102
+	shift
  103
+	goto win9xME_args_slurp
  104
+)
  105
+if "x%~1" == "x-reloading" (
  106
+	set AGENT=%AGENT_STRING%
  107
+	shift
  108
+	goto win9xME_args_slurp
  109
+)
  110
+if "x%~1" == "xrun-app" (
  111
+	set AGENT=%AGENT_STRING%
  112
+	set INTERACTIVE=
  113
+	set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  114
+	shift
  115
+	goto win9xME_args_slurp
  116
+)
  117
+if "x%~1" == "x-noreloading" (
  118
+	set DISABLE_RELOADING=true
  119
+	shift
  120
+	goto win9xME_args_slurp
  121
+)
  122
+set INTERACTIVE=
  123
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  124
+shift
  125
+goto win9xME_args_slurp
  126
+
  127
+:4NT_args
  128
+@rem Get arguments from the 4NT Shell from JP Software
  129
+set CMD_LINE_ARGS=%$
  130
+
  131
+:execute
  132
+@rem Setup the command line
  133
+set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.1.1.jar;wrapper;.
  134
+
  135
+if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"
  136
+
  137
+@rem Setting a classpath using the -cp or -classpath option means not to use
  138
+@rem the global classpath. Groovy behaves then the same as the java interpreter
  139
+
  140
+if "x" == "x%CLASSPATH%" goto after_classpath
  141
+set CP=%CP%;%CLASSPATH%
  142
+:after_classpath
  143
+
  144
+if "x%DISABLE_RELOADING%" == "xtrue" (
  145
+	set AGENT=
  146
+) else (
  147
+	if "x%INTERACTIVE%" == "xtrue" (
  148
+		set AGENT=%AGENT_STRING%
  149
+	)
  150
+)
  151
+
  152
+set STARTER_MAIN_CLASS=org.grails.wrapper.GrailsWrapper
  153
+set STARTER_CONF=%GRAILS_HOME%\conf\groovy-starter.conf
  154
+
  155
+set JAVA_EXE=%JAVA_HOME%\bin\java.exe
  156
+set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar
  157
+
  158
+set JAVA_OPTS=%GRAILS_OPTS% %JAVA_OPTS% %AGENT%
  159
+
  160
+set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
  161
+set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home="%GRAILS_HOME%"
  162
+set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=@grails.version@
  163
+set JAVA_OPTS=%JAVA_OPTS% -Dbase.dir=.
  164
+set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
  165
+set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"
  166
+
  167
+if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat"
  168
+
  169
+@rem Execute Grails
  170
+CALL "%JAVA_EXE%" %JAVA_OPTS% -classpath "%STARTER_CLASSPATH%" %STARTER_MAIN_CLASS% --main %CLASS% --conf "%STARTER_CONF%" --classpath "%CP%" "%CMD_LINE_ARGS%"
  171
+:end
  172
+@rem End local scope for the variables with windows NT shell
  173
+if "%OS%"=="Windows_NT" endlocal
  174
+
  175
+@rem Optional pause the batch file
  176
+if "%GROOVY_BATCH_PAUSE%" == "on" pause
  177
+
2  test/project/bookstore/test/unit/bookstore/BookTests.groovy
@@ -9,6 +9,6 @@ class BookTests {
9 9
     void testTitleIsRequired() {
10 10
 		Book book = new Book()
11 11
 		book.save()
12  
-		assert "nullable" == book.errors['title'].code
  12
+		assert "nullable" == book.errors['title'].code + "1"
13 13
     }
14 14
 }
BIN  test/project/bookstore/wrapper/grails-wrapper-runtime-2.1.1.jar
Binary file not shown
1  test/project/bookstore/wrapper/grails-wrapper.properties
... ...
@@ -0,0 +1 @@
  1
+wrapper.dist.url=http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/
BIN  test/project/bookstore/wrapper/springloaded-core-1.0.6.jar
Binary file not shown
BIN  wrapper/grails-wrapper-runtime-2.1.1.jar
Binary file not shown
1  wrapper/grails-wrapper.properties
... ...
@@ -0,0 +1 @@
  1
+wrapper.dist.url=http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/
BIN  wrapper/springloaded-core-1.0.6.jar
Binary file not shown

0 notes on commit e7b7f5f

Please sign in to comment.
Something went wrong with that request. Please try again.