Skip to content

Commit c7c86db

Browse files
authored
Merge pull request #1144 from matrei/sitemesh2revert
Revert to Sitemesh 2
2 parents 9a63a8e + 5815ce2 commit c7c86db

File tree

64 files changed

+217
-97
lines changed

Some content is hidden

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

64 files changed

+217
-97
lines changed

buildSrc/build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,18 @@ dependencies {
5757
implementation "org.nosphere.apache.rat:org.nosphere.apache.rat.gradle.plugin:${versions.get('ratVersion')}"
5858
implementation "org.gradle.crypto.checksum:org.gradle.crypto.checksum.gradle.plugin:${versions.get('gradleCryptoChecksumVersion')}"
5959

60-
testImplementation 'org.spockframework:spock-core'
60+
testImplementation 'org.spockframework:spock-core', {
61+
exclude(group: 'org.codehaus.groovy') // Use Gradle provided version because: Could not resolve org.codehaus.groovy:groovy:3.0.12
62+
}
63+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher', {
64+
// In Gradle 9, this needs to be declared
65+
// https://docs.gradle.org/8.3/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
66+
}
6167
}
6268

6369
tasks.withType(Test).configureEach {
6470
onlyIf {
65-
![
66-
'skipTests'
67-
].find {
68-
project.hasProperty(it)
69-
}
71+
!project.hasProperty('skipTests')
7072
}
7173

7274
useJUnitPlatform()

gradle.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@
1717
# under the License.
1818
#
1919
projectVersion=7.0.0-SNAPSHOT
20-
grailsVersion=7.0.0-SNAPSHOT
20+
grailsVersion=7.0.0-M5
2121
javaVersion=17
2222

23-
# TODO: This is a work around since the bom does not support exclusions and spring forces groovy version 4.0.26
24-
groovy.version=4.0.27
25-
2623
unboundidLdapSdk=7.0.2
2724
apacheDsVersion=1.5.4
2825
asciidoctorGradlePluginVersion=4.0.4

gradle/plugin-config.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
* under the License.
1818
*/
1919

20+
import org.grails.gradle.plugin.core.GrailsExtension
21+
2022
// The plugins do not have an Application class and are not runnable by themselves
2123
tasks.named('bootRun') { enabled = false }
2224
tasks.named('findMainClass') { enabled = false }
2325

24-
grails {
25-
// turn off dependency management so we *know* we're testing with the right versions and not from a remote repository
26-
springDependencyManagement = false
26+
extensions.configure(GrailsExtension) {
27+
// Explicit `it` is required in extension configuration blocks
28+
it.springDependencyManagement = false
2729
}

gradle/test-config.gradle

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* under the License.
1818
*/
1919

20+
import org.grails.gradle.plugin.core.GrailsExtension
21+
2022
dependencies {
2123
// In Gradle 9, this needs to be declared
2224
// https://docs.gradle.org/8.3/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
@@ -25,11 +27,7 @@ dependencies {
2527

2628
tasks.withType(Test).configureEach {
2729
onlyIf {
28-
![
29-
'skipTests'
30-
].find {
31-
project.hasProperty(it)
32-
}
30+
!project.hasProperty('skipTests')
3331
}
3432

3533
useJUnitPlatform()
@@ -42,20 +40,27 @@ tasks.withType(Test).configureEach {
4240

4341
tasks.named('integrationTest', Test) {
4442
onlyIf {
45-
![
46-
'skipTests'
47-
].find {
48-
project.hasProperty(it)
49-
}
43+
!project.hasProperty('skipTests')
5044
}
5145

52-
systemProperty 'geb.build.reportsDir', reporting.file("$project.projectDir/build/geb-reports")
53-
systemProperties System.properties
46+
systemProperty('geb.build.reportsDir', reporting.file("$projectDir/build/geb-reports"))
47+
systemProperty('grails.geb.reporting.directory', reporting.file("$projectDir/build/geb-reports").canonicalFile.absolutePath)
48+
// systemProperty('grails.geb.recording.mode', 'RECORD_ALL')
49+
systemProperties(System.properties)
50+
5451
doFirst {
5552
logger.quiet(
5653
'\n - Running tests for configuration: {} and Grails: {}',
5754
System.getProperty('TESTCONFIG', 'N/S'),
5855
grailsVersion
5956
)
6057
}
58+
}
59+
60+
extensions.configure(GrailsExtension) {
61+
// Explicit `it` is required in extension configuration blocks
62+
63+
// turn off dependency management so we *know* we're testing with the right
64+
// versions and not from a remote repository
65+
it.springDependencyManagement = false
6166
}

plugin-acl/examples/functional-test-app/src/integration-test/groovy/pages/LoginPage.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class LoginPage extends Page {
2525

2626
static url = 'login/auth'
2727

28-
static at = { waitFor { title == 'Login' } }
28+
static at = { title == 'Login' }
2929

3030
static content = {
3131
loginForm { $('form') }

plugin-core/examples/functional-test-app/src/integration-test/groovy/pages/LoginPage.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class LoginPage extends Page {
2525

2626
static url = 'login/auth'
2727

28-
static at = { waitFor { title == 'Login' } }
28+
static at = { title == 'Login' }
2929

3030
static content = {
3131
loginForm { $('form') }

plugin-core/examples/integration-test-app/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ dependencies {
4646
integrationTestImplementation 'org.apache.grails:grails-testing-support-web', {
4747
// @Integration
4848
}
49-
integrationTestImplementation 'org.sitemesh:sitemesh', {
50-
// SiteMeshFilter
51-
}
5249
integrationTestImplementation 'org.springframework:spring-test', {
5350
// MockFilterChain, MockHttpServletRequest, MockHttpServletResponse
5451
}

plugin-core/examples/integration-test-app/src/integration-test/groovy/grails/plugin/springsecurity/SpringSecurityUtilsIntegrationSpec.groovy

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package grails.plugin.springsecurity
2020

21-
import org.sitemesh.webapp.SiteMeshFilter
2221
import org.springframework.web.filter.FormContentFilter
2322

2423
import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE
@@ -90,7 +89,7 @@ class SpringSecurityUtilsIntegrationSpec extends AbstractIntegrationSpec {
9089
def map = SpringSecurityUtils.configuredOrderedFilters
9190

9291
expect:
93-
11 == map.size()
92+
10 == map.size()
9493
map[Integer.MIN_VALUE + 10] instanceof SecurityRequestHolderFilter
9594
map[SecurityFilterPosition.SECURITY_CONTEXT_FILTER.order] instanceof SecurityContextPersistenceFilter
9695
map[SecurityFilterPosition.LOGOUT_FILTER.order] instanceof MutableLogoutFilter
@@ -99,7 +98,6 @@ class SpringSecurityUtilsIntegrationSpec extends AbstractIntegrationSpec {
9998
map[SecurityFilterPosition.REMEMBER_ME_FILTER.order] instanceof GrailsRememberMeAuthenticationFilter
10099
map[SecurityFilterPosition.ANONYMOUS_FILTER.order] instanceof GrailsAnonymousAuthenticationFilter
101100
map[SecurityFilterPosition.EXCEPTION_TRANSLATION_FILTER.order-10] instanceof FormContentFilter
102-
map[SecurityFilterPosition.EXCEPTION_TRANSLATION_FILTER.order-4] instanceof SiteMeshFilter
103101
map[SecurityFilterPosition.EXCEPTION_TRANSLATION_FILTER.order] instanceof ExceptionTranslationFilter
104102
map[SecurityFilterPosition.FILTER_SECURITY_INTERCEPTOR.order] instanceof FilterSecurityInterceptor
105103

@@ -128,7 +126,7 @@ class SpringSecurityUtilsIntegrationSpec extends AbstractIntegrationSpec {
128126
SpringSecurityUtils.clientRegisterFilter 'dummyFilter', SecurityFilterPosition.LOGOUT_FILTER.order + 10
129127

130128
then:
131-
12 == map.size()
129+
11 == map.size()
132130
map[SecurityFilterPosition.LOGOUT_FILTER.order + 10] instanceof DummyFilter
133131

134132
when:
@@ -144,9 +142,8 @@ class SpringSecurityUtilsIntegrationSpec extends AbstractIntegrationSpec {
144142
filters[6] instanceof GrailsRememberMeAuthenticationFilter
145143
filters[7] instanceof GrailsAnonymousAuthenticationFilter
146144
filters[8] instanceof FormContentFilter
147-
filters[9] instanceof SiteMeshFilter
148-
filters[10] instanceof ExceptionTranslationFilter
149-
filters[11] instanceof FilterSecurityInterceptor
145+
filters[9] instanceof ExceptionTranslationFilter
146+
filters[10] instanceof FilterSecurityInterceptor
150147
}
151148

152149
void 'reauthenticate'() {

plugin-core/examples/misc-functional-test-app/grails-spring-security-group/src/integration-test/groovy/demo/LoginPage.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import geb.Page
2424
class LoginPage extends Page {
2525
static url = "login/auth"
2626

27-
static at = { waitFor { title == 'Login' } }
27+
static at = { title == 'Login' }
2828

2929
static content = {
3030
loginButton { $("#submit", 0) }

plugin-core/examples/misc-functional-test-app/grails-spring-security-hierarchical-roles/src/integration-test/groovy/demo/LoginPage.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import geb.Page
2424
class LoginPage extends Page {
2525
static url = "login/auth"
2626

27-
static at = { waitFor { title == 'Login' } }
27+
static at = { title == 'Login' }
2828

2929
static content = {
3030
loginButton { $("#submit", 0) }

0 commit comments

Comments
 (0)