Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updating test application to grails 2.3.8

  • Loading branch information...
commit 6918dd0dd5fc8c4d9e1536dbcb3dc88a57273fd7 1 parent 216365e
@tednaleid tednaleid authored
View
1  .gitignore
@@ -13,3 +13,4 @@ cobertura.ser
*.iml
*.ipr
*.iws
+test/dummy/target
View
6 test/dummy/application.properties
@@ -1,5 +1,5 @@
#Grails Metadata file
-#Wed Jul 31 10:15:54 EDT 2013
-app.grails.version=2.2.4
-app.name=asset-test
+#Thu Jul 10 19:58:00 CDT 2014
+app.grails.version=2.3.8
+app.name=dummy
app.version=0.1
View
32 test/dummy/grails-app/conf/BuildConfig.groovy
@@ -1,16 +1,13 @@
-grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
+grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
+grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
-// uncomment (and adjust settings) to fork the JVM to isolate classpaths
-//grails.project.fork = [
-// run: [maxMemory:1024, minMemory:64, debug:false, maxPerm:256]
-//]
-
+grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
@@ -26,13 +23,10 @@ grails.project.dependency.resolution = {
grailsPlugins()
grailsHome()
- grailsCentral()
-
mavenLocal()
+ grailsCentral()
mavenCentral()
-
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
- //mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
@@ -40,22 +34,20 @@ grails.project.dependency.resolution = {
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
- runtime 'org.mozilla:rhino:1.7R4'
- // runtime 'mysql:mysql-connector-java:5.1.22'
+ // runtime 'mysql:mysql-connector-java:5.1.27'
+ // runtime 'org.postgresql:postgresql:9.3-1100-jdbc41'
}
plugins {
- runtime ":hibernate:$grailsVersion"
- runtime ":jquery:1.8.3"
- runtime ":resources:1.1.6"
-
- build ":tomcat:$grailsVersion"
+ build ":tomcat:7.0.52.1"
- runtime ":database-migration:1.3.2"
+ // plugins for the compile step
+ compile ":scaffolding:2.0.3"
+ compile ':cache:1.1.2'
- compile ':cache:1.0.1'
+ // plugins needed at runtime but not for compilation
+ runtime ":hibernate:3.6.10.13" // or ":hibernate4:4.3.5.1"
}
}
grails.plugin.location."asset-pipeline" = "../../"
-
View
50 test/dummy/grails-app/conf/Config.groovy
@@ -12,10 +12,11 @@
// }
grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
-grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
-grails.mime.use.accept.header = false
-grails.mime.types = [
- all: '*/*',
+
+// 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 = [ // 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',
@@ -26,21 +27,44 @@ grails.mime.types = [
multipartForm: 'multipart/form-data',
rss: 'application/rss+xml',
text: 'text/plain',
+ hal: ['application/hal+json','application/hal+xml'],
xml: ['text/xml', 'application/xml']
]
// URL Mapping Cache Max Size, defaults to 5000
//grails.urlmapping.cache.maxsize = 1000
-// grails.assets.url = "/asset-test/assets/"
+
// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
+grails.resources.adhoc.includes = ['/images/**', '/css/**', '/js/**', '/plugins/**']
+
+// Legacy setting for codec used to encode data with ${}
+grails.views.default.codec = "html"
+
+// The default scope for controllers. May be prototype, session or singleton.
+// If unspecified, controllers are prototype scoped.
+grails.controllers.defaultScope = 'singleton'
+
+// GSP settings
+grails {
+ views {
+ gsp {
+ encoding = 'UTF-8'
+ htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
+ codecs {
+ expression = 'html' // escapes values inside ${}
+ scriptlet = 'html' // escapes output from scriptlets in GSPs
+ taglib = 'none' // escapes output from taglibs
+ staticparts = 'none' // escapes output from static template parts
+ }
+ }
+ // escapes all not-encoded output at final stage of outputting
+ // filteringCodecForContentType.'text/html' = 'html'
+ }
+}
+
-// The default codec used to encode data with ${}
-grails.views.default.codec = "none" // none, html, base64
-grails.views.gsp.encoding = "UTF-8"
grails.converters.encoding = "UTF-8"
-// enable Sitemesh preprocessing of GSP pages
-grails.views.gsp.sitemesh.preprocess = true
// scaffolding templates configuration
grails.scaffolding.templates.domainSuffix = 'Instance'
@@ -59,7 +83,11 @@ 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 {
View
39 test/dummy/grails-app/conf/DataSource.groovy
@@ -1,5 +1,6 @@
dataSource {
pooled = true
+ jmxExport = true
driverClassName = "org.h2.Driver"
username = "sa"
password = ""
@@ -7,36 +8,48 @@ dataSource {
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
- cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
+ 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"
- pooled = true
+ 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=true
- validationQuery="SELECT 1"
+ // 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
}
}
}
View
15 test/dummy/grails-app/conf/UrlMappings.groovy
@@ -1,14 +1,13 @@
class UrlMappings {
static mappings = {
- "/$controller/$action?/$id?"{
- constraints {
- // apply constraints here
- }
- }
+ "/$controller/$action?/$id?(.$format)?"{
+ constraints {
+ // apply constraints here
+ }
+ }
- "/"(view:"/index")
- "/subtest/index"(view:"/index")
- "500"(view:'/error')
+ "/"(view:"/index")
+ "500"(view:'/error')
}
}
View
37 test/dummy/grails-app/views/index.gsp
@@ -3,7 +3,6 @@
<head>
<meta name="layout" content="main"/>
<title>Welcome to Grails</title>
- <asset:javascript src="application.js"/>
<style type="text/css" media="screen">
#status {
background-color: #eee;
@@ -82,6 +81,42 @@
</style>
</head>
<body>
+ <a href="#page-body" class="skip"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
+ <div id="status" role="complementary">
+ <h1>Application Status</h1>
+ <ul>
+ <li>App version: <g:meta name="app.version"/></li>
+ <li>Grails version: <g:meta name="app.grails.version"/></li>
+ <li>Groovy version: ${GroovySystem.getVersion()}</li>
+ <li>JVM version: ${System.getProperty('java.version')}</li>
+ <li>Reloading active: ${grails.util.Environment.reloadingAgentEnabled}</li>
+ <li>Controllers: ${grailsApplication.controllerClasses.size()}</li>
+ <li>Domains: ${grailsApplication.domainClasses.size()}</li>
+ <li>Services: ${grailsApplication.serviceClasses.size()}</li>
+ <li>Tag Libraries: ${grailsApplication.tagLibClasses.size()}</li>
+ </ul>
+ <h1>Installed Plugins</h1>
+ <ul>
+ <g:each var="plugin" in="${applicationContext.getBean('pluginManager').allPlugins}">
+ <li>${plugin.name} - ${plugin.version}</li>
+ </g:each>
+ </ul>
+ </div>
+ <div id="page-body" role="main">
+ <h1>Welcome to Grails</h1>
+ <p>Congratulations, you have successfully started your first Grails application! At the moment
+ this is the default page, feel free to modify it to either redirect to a controller or display whatever
+ content you may choose. Below is a list of controllers that are currently deployed in this application,
+ click on each to execute its default action:</p>
+ <div id="controller-list" role="navigation">
+ <h2>Available Controllers:</h2>
+ <ul>
+ <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
+ <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li>
+ </g:each>
+ </ul>
+ </div>
+ </div>
</body>
</html>
View
2  test/dummy/grails-app/views/layouts/main.gsp
@@ -15,6 +15,7 @@
<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">
<g:layoutHead/>
+ <g:javascript library="application"/>
<r:layoutResources />
</head>
<body>
@@ -22,7 +23,6 @@
<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>
View
7 test/dummy/web-app/WEB-INF/applicationContext.xml
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
<description>Grails application factory bean</description>
@@ -30,4 +29,6 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
<value>utf-8</value>
</property>
</bean>
+
+ <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
</beans>
View
311 test/dummy/web-app/WEB-INF/tld/spring.tld
@@ -1,311 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-
-<taglib>
-
- <tlib-version>1.1.1</tlib-version>
-
- <jsp-version>1.2</jsp-version>
-
- <short-name>Spring</short-name>
-
- <uri>http://www.springframework.org/tags</uri>
-
- <description>Spring Framework JSP Tag Library. Authors: Rod Johnson, Juergen Hoeller</description>
-
-
- <tag>
-
- <name>htmlEscape</name>
- <tag-class>org.springframework.web.servlet.tags.HtmlEscapeTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Sets default HTML escape value for the current page.
- Overrides a "defaultHtmlEscape" context-param in web.xml, if any.
- </description>
-
- <attribute>
- <name>defaultHtmlEscape</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>escapeBody</name>
- <tag-class>org.springframework.web.servlet.tags.EscapeBodyTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Escapes its enclosed body content, applying HTML escaping and/or JavaScript escaping.
- The HTML escaping flag participates in a page-wide or application-wide setting
- (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
- </description>
-
- <attribute>
- <name>htmlEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>javaScriptEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>message</name>
- <tag-class>org.springframework.web.servlet.tags.MessageTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Retrieves the message with the given code, or text if code isn't resolvable.
- The HTML escaping flag participates in a page-wide or application-wide setting
- (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
- </description>
-
- <attribute>
- <name>code</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>arguments</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>text</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>htmlEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>javaScriptEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>theme</name>
- <tag-class>org.springframework.web.servlet.tags.ThemeTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Retrieves the theme message with the given code, or text if code isn't resolvable.
- The HTML escaping flag participates in a page-wide or application-wide setting
- (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
- </description>
-
- <attribute>
- <name>code</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>arguments</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>text</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>htmlEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>javaScriptEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>hasBindErrors</name>
- <tag-class>org.springframework.web.servlet.tags.BindErrorsTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Provides Errors instance in case of bind errors.
- The HTML escaping flag participates in a page-wide or application-wide setting
- (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
- </description>
-
- <variable>
- <name-given>errors</name-given>
- <variable-class>org.springframework.validation.Errors</variable-class>
- </variable>
-
- <attribute>
- <name>name</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>htmlEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>nestedPath</name>
- <tag-class>org.springframework.web.servlet.tags.NestedPathTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Sets a nested path to be used by the bind tag's path.
- </description>
-
- <variable>
- <name-given>nestedPath</name-given>
- <variable-class>java.lang.String</variable-class>
- </variable>
-
- <attribute>
- <name>path</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>bind</name>
- <tag-class>org.springframework.web.servlet.tags.BindTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Provides BindStatus object for the given bind path.
- The HTML escaping flag participates in a page-wide or application-wide setting
- (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
- </description>
-
- <variable>
- <name-given>status</name-given>
- <variable-class>org.springframework.web.servlet.support.BindStatus</variable-class>
- </variable>
-
- <attribute>
- <name>path</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>ignoreNestedPath</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>htmlEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-
- <tag>
-
- <name>transform</name>
- <tag-class>org.springframework.web.servlet.tags.TransformTag</tag-class>
- <body-content>JSP</body-content>
-
- <description>
- Provides transformation of variables to Strings, using an appropriate
- custom PropertyEditor from BindTag (can only be used inside BindTag).
- The HTML escaping flag participates in a page-wide or application-wide setting
- (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
- </description>
-
- <attribute>
- <name>value</name>
- <required>true</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>var</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>scope</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- <attribute>
- <name>htmlEscape</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
-
- </tag>
-
-</taglib>
View
BIN  test/dummy/web-app/images/grails_logo.jpg
Deleted file not rendered
View
BIN  test/dummy/web-app/images/leftnav_btm.png
Deleted file not rendered
View
BIN  test/dummy/web-app/images/leftnav_midstretch.png
Deleted file not rendered
View
BIN  test/dummy/web-app/images/leftnav_top.png
Deleted file not rendered
Please sign in to comment.
Something went wrong with that request. Please try again.