Skip to content

Commit 13d08b6

Browse files
author
Marco Vermeulen
committed
Merge remote branch 'upstream/master'
Conflicts: src/java/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingsHolder.java src/java/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolderFactoryBean.java
2 parents a166d7b + 2eb3098 commit 13d08b6

File tree

96 files changed

+2018
-410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2018
-410
lines changed

.classpath

+1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@
7878
<classpathentry kind="lib" path="lib/org.springframework.web-3.0.3.RELEASE.jar"/>
7979
<classpathentry kind="lib" path="lib/org.springframework.web.servlet-3.0.3.RELEASE.jar"/>
8080
<classpathentry kind="lib" path="lib/org.springframework.webflow-2.0.8.RELEASE.jar"/>
81+
<classpathentry kind="lib" path="lib/concurrentlinkedhashmap-lru-1.0.jar"/>
8182
<classpathentry kind="output" path="target/eclipse/bin-output"/>
8283
</classpath>

.gitignore

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
idea
2-
doc
3-
cobertura.ser
4-
cruise/coverage/report
5-
downloads
6-
test/groovy/grails/config
7-
test/grails-app
8-
stacktrace.log
9-
dist
10-
idea-target
11-
target
12-
idea-target
13-
build
14-
grails.iws
2+
/doc
3+
/cobertura.ser
4+
/cruise/coverage/report
5+
/downloads
6+
/test/groovy/grails/config
7+
/test/grails-app
8+
/stacktrace.log
9+
/dist
10+
/idea-target
11+
/target
12+
/build
13+
/grails.iws
1514
.gradle
16-
.DS_Store
15+
.DS_Store

Grails.iml

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,13 @@
143143
<orderEntry type="module-library">
144144
<library name="Groovy">
145145
<CLASSES>
146-
<root url="jar://$MODULE_DIR$/lib/groovy-all-1.7.4.jar!/" />
146+
<root url="jar://$MODULE_DIR$/lib/groovy-all-1.7.5.jar!/" />
147147
</CLASSES>
148148
<JAVADOC />
149149
<SOURCES />
150150
</library>
151151
</orderEntry>
152+
<orderEntry type="library" name="ConcurrentLinkedHashMap" level="project" />
152153
</component>
153154
</module>
154155

bin/startGrails

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fi
114114
if [ -z "$GROOVY_CONF" ]; then
115115
GROOVY_CONF="$GRAILS_HOME/conf/groovy-starter.conf"
116116
fi
117-
STARTER_CLASSPATH="$GRAILS_HOME/lib/groovy-all-1.7.4.jar:$GRAILS_HOME/dist/grails-bootstrap-1.3.5.BUILD-SNAPSHOT.jar"
117+
STARTER_CLASSPATH="$GRAILS_HOME/lib/groovy-all-1.7.5.jar:$GRAILS_HOME/dist/grails-bootstrap-1.3.5.BUILD-SNAPSHOT.jar"
118118

119119
# Allow access to Cocoa classes on OS X
120120
if $darwin; then

bin/startGrails.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ set CMD_LINE_ARGS=%$
106106

107107
:execute
108108
@rem Setup the command line
109-
set STARTER_CLASSPATH=%GRAILS_HOME%\lib\groovy-all-1.7.4.jar;%GRAILS_HOME%\dist\grails-bootstrap-1.3.5.BUILD-SNAPSHOT.jar
109+
set STARTER_CLASSPATH=%GRAILS_HOME%\lib\groovy-all-1.7.5.jar;%GRAILS_HOME%\dist\grails-bootstrap-1.3.5.BUILD-SNAPSHOT.jar
110110

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

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ configurations {
2323
dependencies {
2424
lib = "$projectDir/lib"
2525
groovy files(fileTree(dir: lib as File, includes: ['groovy-all-1.7.*.jar']))
26-
compile files(fileTree(dir: lib as File, includes: ['*.jar'], excludes: ['jsp-api-2.1.jar', 'groovy-all-1.7.4.jar']), "${System.getenv('JAVA_HOME')}/lib/tools.jar")
26+
compile files(fileTree(dir: lib as File, includes: ['*.jar'], excludes: ['jsp-api-2.1.jar', 'groovy-all-1.7.5.jar']), "${System.getenv('JAVA_HOME')}/lib/tools.jar")
2727
jsp21 files("$lib/jsp-api-2.1.jar")
2828
}
2929

build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bundlor.servlet.version=2.5.0
1616
bundlor.jndi.version=1.2.0
1717
bundlor.servlet.jsp.version=2.1.0
1818
bundlor.radeox.version=1.0.0.b2
19-
bundlor.groovy.version=1.7.4
19+
bundlor.groovy.version=1.7.5
2020
bundlor.spring.version=3.0.3.RELEASE
2121
bundlor.ant.version=1.7.1
2222
bundlor.ivy.version=2.0.0

conf/groovy-starter.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
##
1111
# Load required libraries
1212
load ${grails.home}/dist/grails-bootstrap-${grails.version}.jar
13-
load ${grails.home}/lib/groovy-all-1.7.4.jar
13+
load ${grails.home}/lib/groovy-all-1.7.5.jar
1414
load ${grails.home}/lib/gpars-0.9.jar
1515
load ${grails.home}/lib/ivy-2.1.0.jar
1616
load ${grails.home}/lib/gant_groovy1.7-1.9.2.jar

dependencies.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ The following libraries are included in Grails because they are required either
8888
- Gant 1.9.2 (http://gant.codehaus.org) Apache 2.0 License
8989
- required for the command line tools (Gant)
9090

91-
* groovy-all-1.7.4.jar
92-
- Groovy 1.7.4 (http://groovy.codehaus.org) Apache 2.0 License
91+
* groovy-all-1.7.5.jar
92+
- Groovy 1.7.5 (http://groovy.codehaus.org) Apache 2.0 License
9393
- required for the command line tools (Gant)
9494
- required for building Grails core
9595
- required for running Grails applications

gradle/assemble.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ task bootstrapJar(type: Jar, description: 'Package up the classes used to bootst
133133
"grails/util/BuildScope*", "grails/util/GrailsMain*", "grails/ant/**/*", "**/groovy/grails/cli/**/*", "**/groovy/grails/resolve/**/*",
134134
"grails/build/**")
135135
from "build.properties"
136+
rename "build.properties", "grails.build.properties"
136137
mavenArtifact = true
137138
}
138139

grails.ipr

+8-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
<component name="ProjectModuleManager">
393393
<modules>
394394
<module fileurl="file://$PROJECT_DIR$/Grails.iml" filepath="$PROJECT_DIR$/Grails.iml" />
395-
<module fileurl="file://$PROJECT_DIR$//JSP21.iml" filepath="$PROJECT_DIR$//JSP21.iml" />
395+
<module fileurl="file://$PROJECT_DIR$/JSP21.iml" filepath="$PROJECT_DIR$/JSP21.iml" />
396396
</modules>
397397
</component>
398398
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
@@ -632,6 +632,13 @@
632632
<JAVADOC />
633633
<SOURCES />
634634
</library>
635+
<library name="ConcurrentLinkedHashMap">
636+
<CLASSES>
637+
<root url="jar://$PROJECT_DIR$/lib/concurrentlinkedhashmap-lru-1.0.jar!/" />
638+
</CLASSES>
639+
<JAVADOC />
640+
<SOURCES />
641+
</library>
635642
</component>
636643
</project>
637644

Binary file not shown.

maven/grails-core.pom.in

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@
8888
<version>2.4</version>
8989
</dependency>
9090

91+
<dependency>
92+
<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
93+
<artifactId>concurrentlinkedhashmap-lru</artifactId>
94+
<version>1.0_jdk5</version>
95+
</dependency>
96+
9197
<dependency>
9298
<groupId>commons-validator</groupId>
9399
<artifactId>commons-validator</artifactId>

maven/grails-docs.pom.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<dependency>
5555
<groupId>org.codehaus.groovy</groupId>
5656
<artifactId>groovy-all</artifactId>
57-
<version>1.7.4</version>
57+
<version>1.7.5</version>
5858
<exclusions>
5959
<exclusion>
6060
<groupId>jline</groupId>

maven/grails-gorm.pom.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
-->
167167
<dependency>
168168
<groupId>net.sf.ehcache</groupId>
169-
<artifactId>echache</artifactId>
169+
<artifactId>ehcache</artifactId>
170170
<version>1.7.1</version>
171171
<optional>true</optional>
172172
</dependency>

maven/grails.pom.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<dependency>
6464
<groupId>org.codehaus.groovy</groupId>
6565
<artifactId>groovy-all</artifactId>
66-
<version>1.7.4</version>
66+
<version>1.7.5</version>
6767
<exclusions>
6868
<exclusion>
6969
<groupId>jline</groupId>

scripts/RunWar.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ includeTargets << grailsScript("_GrailsRun")
3131

3232
shouldPackageTemplates = true
3333

34-
target ('default': "Run's a Grails application's WAR in Jetty") {
34+
target ('default': "Runs a Grails application's WAR in an embedded web server") {
3535
depends(checkVersion, configureProxy, parseArguments)
3636

3737
if (argsMap.restart) {

scripts/_GrailsSettings.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if (grailsSettings.grailsHome) {
4545
ant.property(file: "${grailsHome}/build.properties")
4646
}
4747
else {
48-
ant.property(resource: "build.properties")
48+
ant.property(resource: "grails.build.properties")
4949
}
5050

5151
/**

scripts/_GrailsTest.groovy

+42-18
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import org.codehaus.groovy.grails.test.event.GrailsTestEventConsoleReporter
4141

4242
includeTargets << grailsScript("_GrailsBootstrap")
4343
includeTargets << grailsScript("_GrailsRun")
44+
includeTargets << grailsScript("_GrailsWar")
4445
includeTargets << grailsScript("_GrailsSettings")
4546
includeTargets << grailsScript("_GrailsClean")
4647

@@ -131,11 +132,8 @@ target(allTests: "Runs the project's tests.") {
131132
convertedPhases[phaseName] = types.collect { rawType ->
132133
if (rawType instanceof CharSequence) {
133134
def rawTypeString = rawType.toString()
134-
if (phaseName in ['integration', 'functional']) {
135-
def mode = new GrailsTestMode(
136-
autowire: true,
137-
wrapInTransaction: phaseName == "integration",
138-
wrapInRequestEnvironment: phaseName == "integration")
135+
if (phaseName == 'integration') {
136+
def mode = new GrailsTestMode(autowire: true, wrapInTransaction: true, wrapInRequestEnvironment: true)
139137
new JUnit4GrailsTestType(rawTypeString, rawTypeString, mode)
140138
}
141139
else {
@@ -336,25 +334,51 @@ integrationTestPhaseCleanUp = {
336334
* Starts up the test server.
337335
*/
338336
functionalTestPhasePreparation = {
339-
packageApp()
340-
testOptions.https ? runAppHttps() : runApp()
341-
342-
prevAppCtx = binding.hasProperty('appCtx') ? appCtx : null
343-
appCtx = ApplicationHolder.application.mainContext
344-
345-
initPersistenceContext()
337+
runningFunctionalTestsAgainstWar = testOptions.war
338+
runningFunctionalTestsInline = !runningFunctionalTestsAgainstWar && (!testOptions.containsKey('baseUrl') || testOptions.inline)
339+
340+
if (runningFunctionalTestsAgainstWar) {
341+
// need to swap out the args map so any test phase/targetting patterns
342+
// aren't intepreted as the war name.
343+
def realArgsMap = argsMap
344+
argsMap = [:]
345+
war()
346+
argsMap = realArgsMap
347+
348+
testOptions.https ? runWarHttps() : runWar()
349+
} else if (runningFunctionalTestsInline) {
350+
packageApp()
351+
testOptions.https ? runAppHttps() : runApp()
352+
prevAppCtx = binding.hasProperty('appCtx') ? appCtx : null
353+
appCtx = ApplicationHolder.application.mainContext
354+
initPersistenceContext()
355+
}
356+
357+
if (testOptions.containsKey('baseUrl')) {
358+
functionalBaseUrl = testOptions.baseUrl
359+
} else {
360+
functionalBaseUrl = (testOptions.httpsBaseUrl ? 'https' : 'http') + "://localhost:$serverPort$serverContextPath/"
361+
}
362+
363+
System.setProperty(grailsSettings.FUNCTIONAL_BASE_URL_PROPERTY, functionalBaseUrl)
346364
}
347365

348366
/**
349367
* Shuts down the test server.
350368
*/
351369
functionalTestPhaseCleanUp = {
352-
destroyPersistenceContext()
353-
354-
appCtx?.close()
355-
appCtx = prevAppCtx
356-
357-
stopServer()
370+
if (runningFunctionalTestsInline) {
371+
destroyPersistenceContext()
372+
appCtx?.close()
373+
appCtx = prevAppCtx
374+
}
375+
376+
if (runningFunctionalTestsInline || runningFunctionalTestsAgainstWar) {
377+
stopServer()
378+
}
379+
380+
functionalBaseUrl = null
381+
System.setProperty(grailsSettings.FUNCTIONAL_BASE_URL_PROPERTY, '')
358382
}
359383

360384
otherTestPhasePreparation = {}

scripts/_GrailsWar.groovy

+12-12
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ target (war: "The implementation target") {
103103

104104
event("StatusUpdate", ["Building WAR file"])
105105

106-
ant.copy(todir:stagingDir, overwrite:true) {
106+
ant.copy(todir:stagingDir, overwrite:true, preservelastmodified:true) {
107107
// Allow the application to override the step that copies
108108
// 'web-app' to the staging directory.
109109
if (buildConfig.grails.war.copyToWebApp instanceof Closure) {
@@ -119,7 +119,7 @@ target (war: "The implementation target") {
119119
// package plugin js/etc.
120120
packagePluginsForWar(stagingDir)
121121

122-
ant.copy(todir: "${stagingDir}/WEB-INF/grails-app", overwrite: true) {
122+
ant.copy(todir: "${stagingDir}/WEB-INF/grails-app", overwrite: true, preservelastmodified:true) {
123123
fileset(dir: "${basedir}/grails-app", includes: "views/**")
124124
fileset(dir: "${resourcesDirPath}/grails-app", includes: "i18n/**")
125125
}
@@ -131,21 +131,21 @@ target (war: "The implementation target") {
131131
exclude(name:"spring/*")
132132
}
133133

134-
ant.copy(todir:"${stagingDir}/WEB-INF/classes") {
134+
ant.copy(todir:"${stagingDir}/WEB-INF/classes", preservelastmodified:true) {
135135
fileset(dir:pluginClassesDirPath, classesDirExcludes)
136136
}
137137

138-
ant.copy(todir:"${stagingDir}/WEB-INF/classes", overwrite:true) {
138+
ant.copy(todir:"${stagingDir}/WEB-INF/classes", overwrite:true, preservelastmodified:true) {
139139
fileset(dir:classesDirPath, classesDirExcludes)
140140
}
141141

142142
ant.mkdir(dir:"${stagingDir}/WEB-INF/spring")
143143

144-
ant.copy(todir:"${stagingDir}/WEB-INF/spring") {
144+
ant.copy(todir:"${stagingDir}/WEB-INF/spring", preservelastmodified:true) {
145145
fileset(dir:"${basedir}/grails-app/conf/spring", includes:"**/*.xml")
146146
}
147147

148-
ant.copy(todir:"${stagingDir}/WEB-INF/classes", failonerror:false) {
148+
ant.copy(todir:"${stagingDir}/WEB-INF/classes", failonerror:false, preservelastmodified:true) {
149149
fileset(dir:"${basedir}/grails-app/conf") {
150150
exclude(name:"*.groovy")
151151
exclude(name:"log4j.*")
@@ -165,7 +165,7 @@ target (war: "The implementation target") {
165165

166166
// Copy the project's dependencies (JARs mainly) to the staging area.
167167
if (includeJars) {
168-
ant.copy(todir:"${stagingDir}/WEB-INF/lib") {
168+
ant.copy(todir:"${stagingDir}/WEB-INF/lib", preservelastmodified:true) {
169169
if (buildConfig.grails.war.dependencies instanceof Closure) {
170170
def deps = buildConfig.grails.war.dependencies
171171
deps.delegate = ant
@@ -178,7 +178,7 @@ target (war: "The implementation target") {
178178
}
179179
}
180180

181-
ant.copy(file:webXmlFile.absolutePath, tofile:"${stagingDir}/WEB-INF/web.xml", overwrite:true)
181+
ant.copy(file:webXmlFile.absolutePath, tofile:"${stagingDir}/WEB-INF/web.xml", overwrite:true, preservelastmodified:true)
182182

183183
def webXML = new File("${stagingDir}/WEB-INF/web.xml")
184184
def xmlInput = new XmlParser().parse(webXML)
@@ -206,7 +206,7 @@ target (war: "The implementation target") {
206206

207207
if (includeJars) {
208208
if (pluginInfos) {
209-
ant.copy(todir:"${stagingDir}/WEB-INF/lib", flatten:true, failonerror:false) {
209+
ant.copy(todir:"${stagingDir}/WEB-INF/lib", flatten:true, failonerror:false, preservelastmodified:true) {
210210
for (GrailsPluginInfo info in pluginInfos) {
211211
fileset(dir: info.pluginDir.file.path) {
212212
include(name:"lib/*.jar")
@@ -419,7 +419,7 @@ private def warPluginForPluginInfo(GrailsPluginInfo info) {
419419
// copy views and i18n to /WEB-INF/plugins/...
420420
def targetPluginDir = "${stagingDir}/WEB-INF/plugins/${info.name}-${info.version}"
421421
mkdir(dir: targetPluginDir)
422-
copy(todir: targetPluginDir, failonerror: true) {
422+
copy(todir: targetPluginDir, failonerror: true, preservelastmodified:true) {
423423
fileset(dir: pluginBase.absolutePath) {
424424
include(name: "plugin.xml")
425425
include(name: "grails-app/views/**")
@@ -438,7 +438,7 @@ private def warPluginForPluginInfo(GrailsPluginInfo info) {
438438
// copy spring configs to /WEB-INF/spring/...
439439
def springDir = new File("${pluginBase.absolutePath}/grails-app/conf/spring")
440440
if (springDir.exists()) {
441-
ant.copy(todir: "${stagingDir}/WEB-INF/spring", failonerror: false) {
441+
ant.copy(todir: "${stagingDir}/WEB-INF/spring", failonerror: false, preservelastmodified:true) {
442442
fileset(dir: springDir, includes: "**/*.xml")
443443
}
444444
}
@@ -449,7 +449,7 @@ private def warPluginForPluginInfo(GrailsPluginInfo info) {
449449
def hibDir = new File("${pluginBase.absolutePath}/grails-app/conf/hibernate")
450450
def javaDir = new File("${pluginBase.absolutePath}/src/java")
451451
if (confDir.exists() || hibDir.exists() || javaDir.exists()) {
452-
ant.copy(todir: targetClassesDir, failonerror: false) {
452+
ant.copy(todir: targetClassesDir, failonerror: false, preservelastmodified:true) {
453453
if (confDir.exists()) {
454454
fileset(dir: confDir) {
455455
exclude(name: "*.groovy")

src/grails/docs/style/layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<html>
22
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
34
<title>${title} ${version} - Reference Documentation</title>
45
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" title="Style" charset="utf-8"/>
56
<link rel="stylesheet" href="../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8" />

src/grails/templates/scaffolding/show.gsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<td valign="top" class="value"><g:formatBoolean boolean="\${${propertyName}?.${p.name}}" /></td>
4545
<% } else if (p.type == Date.class || p.type == java.sql.Date.class || p.type == java.sql.Time.class || p.type == Calendar.class) { %>
4646
<td valign="top" class="value"><g:formatDate date="\${${propertyName}?.${p.name}}" /></td>
47-
<% } else { %>
47+
<% } else if(!p.type.isArray()) { %>
4848
<td valign="top" class="value">\${fieldValue(bean: ${propertyName}, field: "${p.name}")}</td>
4949
<% } %>
5050
</tr>

0 commit comments

Comments
 (0)