Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM u.melt.sh/totem/java-oracle-base:7
FROM makuk66/docker-oracle-java7

WORKDIR /opt/grails

Expand Down
4 changes: 2 additions & 2 deletions grails/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Grails Metadata file
#Tue Oct 15 10:33:38 MST 2013
app.grails.version=2.3.0
#Tue Jun 10 10:49:12 BST 2014
app.grails.version=2.4.0
app.name=grails
app.version=0.1
20 changes: 20 additions & 0 deletions grails/grails-app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This is a manifest file that'll be compiled into application.js.
//
// Any JavaScript file within this directory can be referenced here using a relative path.
//
// You're free to add application-wide JavaScript to this file, but it's generally better
// to create separate JavaScript files as needed.
//
//= require jquery
//= require_tree .
//= require_self

if (typeof jQuery !== 'undefined') {
(function($) {
$('#spinner').ajaxStart(function() {
$(this).fadeIn();
}).ajaxStop(function() {
$(this).fadeOut();
});
})(jQuery);
}
13 changes: 13 additions & 0 deletions grails/grails-app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS file within this directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require main
*= require mobile
*= require_self
*/
5 changes: 0 additions & 5 deletions grails/grails-app/conf/ApplicationResources.groovy

This file was deleted.

29 changes: 17 additions & 12 deletions grails/grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,30 @@ grails.project.dependency.resolution = {

dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// runtime 'mysql:mysql-connector-java:5.1.24'
// runtime 'mysql:mysql-connector-java:5.1.29'
// runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'

compile "org.springframework:spring-orm:$springVersion"
}

plugins {
// plugins for the build system only
build ":tomcat:7.0.42"
build ":tomcat:7.0.53"

// plugins for the compile step
compile ":scaffolding:2.0.0"
compile ':cache:1.1.1'
compile ":scaffolding:2.1.0"
compile ':cache:1.1.6'
compile ":asset-pipeline:1.8.7"

// plugins needed at runtime but not for compilation
runtime ":hibernate:3.6.10.1" // or ":hibernate4:4.1.11.1"
runtime ":database-migration:1.3.5"
runtime ":jquery:1.10.2"
runtime ":resources:1.2"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0.1"
//runtime ":cached-resources:1.1"
//runtime ":yui-minify-resources:0.1.5"
runtime ":hibernate4:4.3.5.3" // or ":hibernate:3.6.10.15"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"

// Uncomment these to enable additional asset-pipeline capabilities
//compile ":sass-asset-pipeline:1.7.4"
//compile ":less-asset-pipeline:1.7.0"
//compile ":coffee-asset-pipeline:1.7.0"
//compile ":handlebars-asset-pipeline:1.3.0.3"
}
}
22 changes: 12 additions & 10 deletions grails/grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ grails.project.groupId = appName // change this to alter the default package nam

// The ACCEPT header will not be used for content negotiation for user agents containing the following strings (defaults to the 4 major rendering engines)
grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
grails.mime.types = [
all: '*/*',
grails.mime.types = [ // the first one is the default format
all: '*/*', // 'all' maps to '*' or the first available format in withFormat
atom: 'application/atom+xml',
css: 'text/css',
csv: 'text/csv',
Expand All @@ -34,9 +34,6 @@ grails.mime.types = [
// URL Mapping Cache Max Size, defaults to 5000
//grails.urlmapping.cache.maxsize = 1000

// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']

// Legacy setting for codec used to encode data with ${}
grails.views.default.codec = "html"

Expand All @@ -58,12 +55,11 @@ grails {
}
}
// escapes all not-encoded output at final stage of outputting
filteringCodecForContentType {
//'text/html' = 'html'
}
// filteringCodecForContentType.'text/html' = 'html'
}
}



grails.converters.encoding = "UTF-8"
// scaffolding templates configuration
grails.scaffolding.templates.domainSuffix = 'Instance'
Expand All @@ -83,6 +79,12 @@ grails.exceptionresolver.params.exclude = ['password']
// configure auto-caching of queries by default (if false you can cache individual queries with 'cache: true')
grails.hibernate.cache.queries = false

// configure passing transaction's read-only attribute to Hibernate session, queries and criterias
// set "singleSession = false" OSIV mode in hibernate configuration after enabling
grails.hibernate.pass.readonly = false
// configure passing read-only to OSIV session by default, requires "singleSession = false" OSIV mode
grails.hibernate.osiv.readonly = false

environments {
development {
grails.logging.jul.usebridge = true
Expand All @@ -94,7 +96,7 @@ environments {
}

// log4j configuration
log4j = {
log4j.main = {
// Example of changing the log pattern for the default console appender:
//
//appenders {
Expand Down
39 changes: 25 additions & 14 deletions grails/grails-app/conf/DataSource.groovy
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
dataSource {
pooled = true
jmxExport = true
driverClassName = "org.h2.Driver"
username = "sa"
password = ""
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
// cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
singleSession = true // configure OSIV singleSession mode
}

// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
properties {
maxActive = -1
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=false
validationQuery="SELECT 1"
jdbcInterceptors="ConnectionState"
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = true
initialSize = 5
maxActive = 50
minIdle = 5
maxIdle = 25
maxWait = 10000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "SELECT 1"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState"
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion grails/grails-app/conf/UrlMappings.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class UrlMappings {

static mappings = {
"/$controller/$action?/$id?(.${format})?"{
"/$controller/$action?/$id?(.$format)?"{
constraints {
// apply constraints here
}
Expand Down
2 changes: 1 addition & 1 deletion grails/grails-app/views/error.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title><g:if env="development">Grails Runtime Exception</g:if><g:else>Error</g:else></title>
<meta name="layout" content="main">
<g:if env="development"><link rel="stylesheet" href="${resource(dir: 'css', file: 'errors.css')}" type="text/css"></g:if>
<g:if env="development"><asset:stylesheet src="errors.css"/></g:if>
</head>
<body>
<g:if env="development">
Expand Down
15 changes: 6 additions & 9 deletions grails/grails-app/views/layouts/main.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><g:layoutTitle default="Grails"/></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
<link rel="shortcut icon" href="${assetPath(src: 'favicon.ico')}" type="image/x-icon">
<link rel="apple-touch-icon" href="${assetPath(src: 'apple-touch-icon.png')}">
<link rel="apple-touch-icon" sizes="114x114" href="${assetPath(src: 'apple-touch-icon-retina.png')}">
<asset:stylesheet src="application.css"/>
<asset:javascript src="application.js"/>
<g:layoutHead/>
<r:layoutResources />
</head>
<body>
<div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails"/></a></div>
<div id="grailsLogo" role="banner"><a href="http://grails.org"><asset:image src="grails_logo.png" alt="Grails"/></a></div>
<g:layoutBody/>
<div class="footer" role="contentinfo"></div>
<div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt" default="Loading&hellip;"/></div>
<g:javascript library="application"/>
<r:layoutResources />
</body>
</html>
35 changes: 30 additions & 5 deletions grails/grailsw
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ earlyInit
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
mingw=false;
case "`uname`" in
CYGWIN*)
cygwin=true
Expand All @@ -44,6 +45,10 @@ case "`uname`" in
Darwin*)
darwin=true
;;

MINGW*)
mingw=true
;;
esac

# Attempt to set JAVA_HOME if it's not already set
Expand Down Expand Up @@ -74,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 @@ -118,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.0.jar:wrapper:."
STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.4.0.jar:wrapper:."

# Allow access to Cocoa classes on OS X
if $darwin; then
Expand Down Expand Up @@ -179,16 +193,22 @@ if $cygwin ; then
AGENT_GRAILS_HOME=`cygpath --windows "$GRAILS_HOME"`
fi

if $mingw ; then
# Converts GRAILS_HOME path to Windows syntax
[ -n "$GRAILS_HOME" ] &&
AGENT_GRAILS_HOME=`cmd //C echo "$GRAILS_HOME"`
fi

if [ -z "$GRAILS_AGENT_CACHE_DIR" ]; then
GRAILS_AGENT_CACHE_DIR=~/.grails/2.3.0/
GRAILS_AGENT_CACHE_DIR=~/.grails/2.4.0/
fi
SPRINGLOADED_PARAMS=profile=grails\;cacheDir=$GRAILS_AGENT_CACHE_DIR
if [ ! -d "$GRAILS_AGENT_CACHE_DIR" ]; then
mkdir -p "$GRAILS_AGENT_CACHE_DIR"
fi

# Process JVM args
AGENT_STRING="-javaagent:wrapper/springloaded-core-1.1.3.jar -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=$SPRINGLOADED_PARAMS"
AGENT_STRING="-javaagent:wrapper/springloaded-1.2.0.RELEASE.jar -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=$SPRINGLOADED_PARAMS"
CMD_LINE_ARGS=""
DISABLE_RELOADING=true

Expand Down Expand Up @@ -264,7 +284,9 @@ if $cygwin; then
GRAILS_HOME=`cygpath --path --mixed "$GRAILS_HOME"`
JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
STARTER_CONF=`cygpath --path --mixed "$STARTER_CONF"`
CP=`cygpath --path --mixed "$CP"`
if [ "x$CP" != "x" ] ; then
CP=`cygpath --path --mixed "$CP"`
fi
TOOLS_JAR=`cygpath --path --mixed "$TOOLS_JAR"`
STARTER_CLASSPATH=`cygpath --path --mixed "$STARTER_CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
Expand Down Expand Up @@ -303,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
Loading