Skip to content

Commit

Permalink
Grails upgraded to 2.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
benorama committed Aug 20, 2014
1 parent b60ac3d commit d672b40
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 1,256 deletions.
6 changes: 3 additions & 3 deletions application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Grails Metadata file
#Mon Apr 28 16:08:27 CEST 2014
app.grails.version=2.3.11
#Wed Aug 20 10:26:35 CEST 2014
app.grails.version=2.4.3
app.name=facebook-sdk-demo
app.servlet.version=3.0
app.version=0.1
app.version=2.4.3
18 changes: 15 additions & 3 deletions grailsw
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ if $cygwin ; then
CP=`cygpath --path --unix "$CP"`
fi

# quick detection of JDK version without JVM startup overhead
CLASSFILE_HEADER_FILE="${JAVA_HOME}/include/classfile_constants.h"
if [ -z "$GRAILS_NO_PERMGEN" -a -f "${CLASSFILE_HEADER_FILE}" ]; then
CLASSFILE_VERSION=`cat "${CLASSFILE_HEADER_FILE}" | grep "#define JVM_CLASSFILE_MAJOR_VERSION" | awk '{ print $3 }' 2> /dev/null`
if [ 0$CLASSFILE_VERSION -ge 52 ]; then
GRAILS_NO_PERMGEN=1
fi
fi

# Remove possible trailing slash (after possible cygwin correction)
GRAILS_HOME=`echo $GRAILS_HOME | sed -e 's|/$||g'`

Expand Down Expand Up @@ -123,7 +132,7 @@ fi
if [ -z "$STARTER_CONF" ]; then
STARTER_CONF="$GRAILS_HOME/conf/groovy-starter.conf"
fi
STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.3.11.jar:wrapper:."
STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.4.3.jar:wrapper:."

# Allow access to Cocoa classes on OS X
if $darwin; then
Expand Down Expand Up @@ -191,7 +200,7 @@ if $mingw ; then
fi

if [ -z "$GRAILS_AGENT_CACHE_DIR" ]; then
GRAILS_AGENT_CACHE_DIR=~/.grails/2.3.11/
GRAILS_AGENT_CACHE_DIR=~/.grails/2.4.3/
fi
SPRINGLOADED_PARAMS=profile=grails\;cacheDir=$GRAILS_AGENT_CACHE_DIR
if [ ! -d "$GRAILS_AGENT_CACHE_DIR" ]; then
Expand Down Expand Up @@ -316,7 +325,10 @@ startGrails() {
then
GRAILS_OPTS="$GRAILS_OPTS"
else
GRAILS_OPTS="-server -Xmx768M -Xms64M -XX:PermSize=32m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8"
GRAILS_OPTS="-server -Xmx768M -Xms64M -Dfile.encoding=UTF-8"
if [ "$GRAILS_NO_PERMGEN" != "1" ]; then
GRAILS_OPTS="$GRAILS_OPTS -XX:PermSize=32m -XX:MaxPermSize=256m"
fi
fi
JAVA_OPTS="$GRAILS_OPTS $JAVA_OPTS $AGENT"
# Start the Profiler or the JVM
Expand Down
18 changes: 14 additions & 4 deletions grailsw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,23 @@ if "%GRAILS_HOME:~-1%"=="\" SET GRAILS_HOME=%GRAILS_HOME:~0,-1%
:init

for %%x in ("%USERPROFILE%") do set SHORTHOME=%%~fsx
if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/2.3.11/
if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/2.4.3/
set SPRINGLOADED_PARAMS="profile=grails;cacheDir=%GRAILS_AGENT_CACHE_DIR%"
if not exist "%GRAILS_AGENT_CACHE_DIR%" mkdir "%GRAILS_AGENT_CACHE_DIR%"

if "%GRAILS_NO_PERMGEN%" == "" (
type "%JAVA_HOME%\include\classfile_constants.h" 2>nul | findstr /R /C:"#define JVM_CLASSFILE_MAJOR_VERSION 5[23]" >nul
if not errorlevel 1 set GRAILS_NO_PERMGEN=1
)

set AGENT_STRING=-javaagent:wrapper/springloaded-1.2.0.RELEASE.jar -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=\"%SPRINGLOADED_PARAMS%\"
set DISABLE_RELOADING=
if "%GRAILS_OPTS%" == "" set GRAILS_OPTS=-server -Xmx768M -Xms64M -XX:PermSize=32m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8
if "%GRAILS_OPTS%" == "" (
set GRAILS_OPTS=-server -Xmx768M -Xms64M -Dfile.encoding=UTF-8
if not "%GRAILS_NO_PERMGEN%" == "1" (
set GRAILS_OPTS=-server -Xmx768M -Xms64M -XX:PermSize=32m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8
)
)

@rem Get command-line arguments, handling Windows variants
if "%@eval[2+2]" == "4" goto 4NT_args
Expand Down Expand Up @@ -130,7 +140,7 @@ set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.3.11.jar;wrapper;.
set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.4.3.jar;wrapper;.

if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"

Expand Down Expand Up @@ -159,7 +169,7 @@ set JAVA_OPTS=%GRAILS_OPTS% %JAVA_OPTS% %AGENT%

set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home="%GRAILS_HOME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=2.3.11
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=2.4.3
set JAVA_OPTS=%JAVA_OPTS% -Dbase.dir=.
set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"
Expand Down
3 changes: 0 additions & 3 deletions web-app/WEB-INF/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
<description>Grails application factory bean</description>
<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
<property name="grailsResourceLoader" ref="grailsResourceLoader" />
</bean>

<bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
Expand All @@ -22,8 +21,6 @@
<property name="pluginManager" ref="pluginManager" />
</bean>

<bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />

<bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
<property name="encoding">
<value>utf-8</value>
Expand Down
Loading

0 comments on commit d672b40

Please sign in to comment.