Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 7: grails-spring-security-acl #44

Merged
merged 4 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
subprojects {
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if ((details.requested.group == 'org.codehaus.groovy' || details.requested.group == 'org.apache.groovy') && details.requested.name != 'groovy-bom') {
String groovyVersion = findProperty('groovyVersion') ?: libs.versions.groovy.get()
details.useTarget(group: 'org.apache.groovy', name: details.requested.name, version: groovyVersion)
details.because "The dependency coordinates are changed in Apache Groovy 4, plus ensure version"
}
}
}
}
6 changes: 3 additions & 3 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ buildscript {
maven { url 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.1'
classpath 'org.asciidoctor:asciidoctorj-epub3:2.1.3'
classpath 'org.asciidoctor:asciidoctorj-pdf:2.3.18'
}
}

Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/code/grails-app/views/error.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<g:if test="${Throwable.isInstance(exception)}">
<g:renderException exception="${exception}" />
</g:if>
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}" />
<g:elseif test="${request.getAttribute('jakarta.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('jakarta.servlet.error.exception')}" />
</g:elseif>
<g:else>
<ul class="errors">
Expand Down
81 changes: 38 additions & 43 deletions functional-test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.7"
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:1.4"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:5.0.1"
classpath "org.grails.plugins:hibernate5:$gormVersion"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.7"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting to ContainerGebSpec removes the requirement for this. Going forward, the webdriver binaries are abandoned so I would switch to the newer way. You can also remove the withTest, GebConfig, web driver config, and any Geb headless properties in the CI. The geb plugin has an updated readme that shows a single gradle line to support ContainerGebSpec.

}
}

Expand All @@ -18,7 +18,7 @@ apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.energizedwork.webdriver-binaries"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"

Expand All @@ -28,53 +28,48 @@ repositories {
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
compile "org.grails.plugins:gsp"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-web-boot"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
implementation "org.grails.plugins:gsp"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.7"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "org.apache.tomcat:tomcat-jdbc"
runtime "com.h2database:h2"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails:grails-web-testing-support"
testCompile "io.micronaut:micronaut-http-client:$micronautVersion"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.6.0"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.6.0"
testCompile "org.seleniumhq.selenium:selenium-api:3.6.0"
compile project(':spring-security-acl')
}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
sourceResources sourceSets.main
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:5.0.1"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.h2database:h2"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "io.micronaut:micronaut-http-client:$micronautVersion"
testImplementation "org.grails.plugins:geb"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:4.19.1"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.19.1"
testImplementation "org.seleniumhq.selenium:selenium-api:4.19.1"
implementation project(':spring-security-acl')
}

webdriverBinaries {
chromedriver '2.35'
geckodriver '0.18.0'
chromedriver '2.46.0'
geckodriver '0.29.1'
}

tasks.withType(Test) {
useJUnitPlatform()
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
Expand Down
37 changes: 0 additions & 37 deletions functional-test-app/grails-app/conf/logback.groovy

This file was deleted.

21 changes: 21 additions & 0 deletions functional-test-app/grails-app/conf/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder>
<charset>UTF-8</charset>
<pattern>%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex</pattern>
</encoder>
</appender>

<root level="error">
<appender-ref ref="STDOUT" />
</root>

<logger name="grails.plugin.springsecurity.acl" level="INFO" />

</configuration>
4 changes: 2 additions & 2 deletions functional-test-app/grails-app/views/error.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<g:if test="${Throwable.isInstance(exception)}">
<g:renderException exception="${exception}" />
</g:if>
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}" />
<g:elseif test="${request.getAttribute('jakarta.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('jakarta.servlet.error.exception')}" />
</g:elseif>
<g:else>
<ul class="errors">
Expand Down
17 changes: 9 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
projectVersion=5.0.0-SNAPSHOT
grailsVersion=4.0.0.RC1
gormVersion=7.0.0.RC2
gradleWrapperVersion=4.9
grailsVersion=7.0.0-SNAPSHOT
gormVersion=9.0.0-SNAPSHOT
vcsUrl=https://github.com/grails-plugins/grails-spring-security-acl
springSecurityVersion=5.1.2.RELEASE
springSecurityCoreVersion=4.0.0.M2
javaServletApiVersion=3.1.0
micronautVersion=1.0.5
hibernateCoreVersion=5.3.7.Final
springSecurityVersion=6.3.3
springSecurityCoreVersion=7.0.0-SNAPSHOT
jakartaServletApiVersion=6.0.0
micronautVersion=4.5.3
hibernateCoreVersion=5.6.15.Final
groovyVersion=4.0.23
ehcacheVersion=3.10.8
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Loading