Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit 60f869f

Browse files
authored
Merge pull request #44 from bkoehm/bkoehm.5.0.x
Grails 7: grails-spring-security-acl
2 parents ad71fc4 + 775f614 commit 60f869f

39 files changed

+804
-898
lines changed

.github/workflows/gradle.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Java CI
2+
on:
3+
push:
4+
branches:
5+
- '[5-9]+.[0-9]+.x'
6+
pull_request:
7+
branches:
8+
- '[5-9]+.[0-9]+.x'
9+
workflow_dispatch:
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
env:
14+
WORKSPACE: ${{ github.workspace }}
15+
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up JDK
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'temurin'
22+
java-version: 17
23+
- name: Run Tests
24+
if: github.event_name == 'pull_request'
25+
id: tests
26+
uses: gradle/gradle-build-action@v2
27+
with:
28+
arguments: check -Dgeb.env=chromeHeadless
29+
- name: Run Build
30+
if: github.event_name == 'push'
31+
id: build
32+
uses: gradle/gradle-build-action@v2
33+
env:
34+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
35+
with:
36+
arguments: build -Dgeb.env=chromeHeadless
37+
- name: Publish Test Report
38+
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
39+
uses: scacap/action-surefire-report@v1
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
report_paths: '**/build/test-results/test/TEST-*.xml'
43+
- name: Publish to repo.grails.org
44+
id: publish
45+
uses: gradle/gradle-build-action@v2
46+
if: steps.build.outcome == 'success' && github.event_name == 'push'
47+
env:
48+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
49+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
50+
with:
51+
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
52+
- name: Build Documentation
53+
id: docs
54+
uses: gradle/gradle-build-action@v2
55+
with:
56+
arguments: docs:docs

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Build Status](https://travis-ci.org/grails-plugins/grails-spring-security-acl.svg?branch=master)
2-
31
Grails Spring Security ACL Plugin
42
==================================
53

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
subprojects {
2+
configurations.configureEach {
3+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
4+
if (details.requested.group == 'org.seleniumhq.selenium') {
5+
details.useVersion(seleniumVersion)
6+
}
7+
}
8+
}
9+
}

docs/build.gradle

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ buildscript {
33
maven { url 'https://repo.grails.org/grails/core' }
44
}
55
dependencies {
6-
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
7-
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6'
8-
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
6+
classpath 'org.asciidoctor:asciidoctor-gradle-jvm:4.0.3'
7+
classpath "org.asciidoctor:asciidoctor-gradle-jvm-epub:4.0.3"
8+
classpath "org.asciidoctor:asciidoctor-gradle-jvm-pdf:4.0.3"
9+
classpath "org.asciidoctor:asciidoctor-gradle-jvm-gems:4.0.3"
910
}
1011
}
1112

12-
import org.apache.tools.ant.taskdefs.condition.Os
13-
apply plugin: 'org.asciidoctor.convert'
13+
apply plugin: "org.asciidoctor.jvm.gems"
14+
apply plugin: 'org.asciidoctor.jvm.convert'
15+
apply plugin: "org.asciidoctor.jvm.pdf"
16+
apply plugin: "org.asciidoctor.jvm.epub"
1417

1518
def asciidoctorAttributes = [
1619
copyright : 'Apache License, Version 2.0',
@@ -34,28 +37,62 @@ def asciidoctorAttributes = [
3437
projectVersion : project.projectVersion,
3538
]
3639

40+
repositories {
41+
mavenCentral()
42+
maven { url 'https://repo.grails.org/grails/core' }
43+
ruby.gems()
44+
}
3745

38-
import org.apache.tools.ant.taskdefs.condition.Os
39-
import org.asciidoctor.gradle.AsciidoctorTask
46+
dependencies {
47+
asciidoctorGems 'rubygems:rouge:4.4.0'
48+
}
4049

41-
tasks.withType(AsciidoctorTask) {
50+
asciidoctor {
51+
sourceDir file('src/docs')
52+
sources {
53+
include 'index.adoc'
54+
}
55+
outputDir = new File(buildDir, 'docs')
4256
attributes asciidoctorAttributes
43-
outputDir new File(buildDir, 'docs')
44-
separateOutputDirs = false
57+
}
58+
59+
asciidoctorPdf {
60+
dependsOn asciidoctorGemsPrepare
4561
sourceDir = file('src/docs')
4662
sources {
4763
include 'index.adoc'
4864
}
65+
outputDir = new File(buildDir, 'docs')
66+
67+
asciidoctorj {
68+
requires 'rouge'
69+
attributes asciidoctorAttributes
70+
}
4971
}
5072

73+
asciidoctorEpub {
74+
dependsOn asciidoctorGemsPrepare
75+
sourceDir = file('src/docs')
76+
sources {
77+
include 'index.adoc'
78+
}
79+
outputDir = new File(buildDir, 'docs')
5180

52-
task asciidoc(type: AsciidoctorTask, description: 'Generates single-page HTML, PDF, and EPUB3') {
53-
group 'documentation'
54-
backends 'html5', 'pdf', 'epub3'
81+
asciidoctorj {
82+
requires 'rouge'
83+
attributes asciidoctorAttributes
84+
}
85+
86+
ebookFormats = ["EPUB3"]
87+
}
88+
89+
tasks.named("asciidoctor").configure {
90+
dependsOn = ['asciidoctorPdf', 'asciidoctorEpub']
5591
}
5692

57-
task docs(dependsOn: [asciidoc]) {
58-
group 'documentation'
93+
tasks.register("docs") {
94+
group = "documentation"
95+
dependsOn = ["asciidoctor"]
5996
doLast {
6097
File dir = new File(buildDir, 'docs')
6198
['epub', 'pdf'].each { String ext ->
@@ -73,4 +110,4 @@ task docs(dependsOn: [asciidoc]) {
73110
include '**/*.png'
74111
}
75112
}
76-
}
113+
}

docs/src/docs/code/grails-app/views/error.gsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<g:if test="${Throwable.isInstance(exception)}">
1111
<g:renderException exception="${exception}" />
1212
</g:if>
13-
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
14-
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}" />
13+
<g:elseif test="${request.getAttribute('jakarta.servlet.error.exception')}">
14+
<g:renderException exception="${request.getAttribute('jakarta.servlet.error.exception')}" />
1515
</g:elseif>
1616
<g:else>
1717
<ul class="errors">

docs/src/docs/index.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
:includedir: src/docs/
12
= Spring Security ACL Plugin - Reference Documentation
23
Burt Beckwith
34

@@ -8,20 +9,20 @@ Burt Beckwith
89
:toclevels: 2
910
:numbered:
1011

11-
include::introduction.adoc[]
12+
include::{includedir}introduction.adoc[]
1213

13-
include::installing.adoc[]
14+
include::{includedir}installing.adoc[]
1415

15-
include::usage.adoc[]
16+
include::{includedir}usage.adoc[]
1617

17-
include::tutorial.adoc[]
18+
include::{includedir}tutorial.adoc[]
1819

19-
include::sampleApp.adoc[]
20+
include::{includedir}sampleApp.adoc[]
2021

21-
include::AclUtilService.adoc[]
22+
include::{includedir}AclUtilService.adoc[]
2223

23-
include::Scripts.adoc[]
24+
include::{includedir}Scripts.adoc[]
2425

25-
include::TagLibraries.adoc[]
26+
include::{includedir}TagLibraries.adoc[]
2627

27-
include::history.adoc[]
28+
include::{includedir}history.adoc[]

functional-test-app/build.gradle

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ buildscript {
55
}
66
dependencies {
77
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
8-
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.7"
9-
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
10-
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:1.4"
8+
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:5.0.1"
9+
classpath "org.grails.plugins:hibernate5:$gormVersion"
10+
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
1111
}
1212
}
1313

@@ -18,7 +18,7 @@ apply plugin:"eclipse"
1818
apply plugin:"idea"
1919
apply plugin:"war"
2020
apply plugin:"org.grails.grails-web"
21-
apply plugin:"com.energizedwork.webdriver-binaries"
21+
apply plugin:"com.github.erdi.webdriver-binaries"
2222
apply plugin:"asset-pipeline"
2323
apply plugin:"org.grails.grails-gsp"
2424

@@ -28,56 +28,53 @@ repositories {
2828
}
2929

3030
dependencies {
31-
compile "org.springframework.boot:spring-boot-starter-logging"
32-
compile "org.springframework.boot:spring-boot-autoconfigure"
33-
compile "org.grails:grails-core"
34-
compile "org.springframework.boot:spring-boot-starter-actuator"
35-
compile "org.springframework.boot:spring-boot-starter-tomcat"
36-
compile "org.grails:grails-logging"
37-
compile "org.grails:grails-plugin-rest"
38-
compile "org.grails:grails-plugin-databinding"
39-
compile "org.grails:grails-plugin-i18n"
40-
compile "org.grails:grails-plugin-services"
41-
compile "org.grails:grails-plugin-url-mappings"
42-
compile "org.grails:grails-plugin-interceptors"
43-
compile "org.grails:grails-web-boot"
44-
compile "org.grails.plugins:cache"
45-
compile "org.grails.plugins:async"
46-
compile "org.grails.plugins:scaffolding"
47-
compile "org.grails.plugins:events"
48-
compile "org.grails.plugins:hibernate5"
49-
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
50-
compile "org.grails.plugins:gsp"
31+
implementation "org.springframework.boot:spring-boot-starter-logging"
32+
implementation "org.springframework.boot:spring-boot-autoconfigure"
33+
implementation "org.grails:grails-core"
34+
implementation "org.springframework.boot:spring-boot-starter-actuator"
35+
implementation "org.springframework.boot:spring-boot-starter-tomcat"
36+
implementation "org.grails:grails-logging"
37+
implementation "org.grails:grails-plugin-rest"
38+
implementation "org.grails:grails-plugin-databinding"
39+
implementation "org.grails:grails-plugin-i18n"
40+
implementation "org.grails:grails-plugin-services"
41+
implementation "org.grails:grails-plugin-url-mappings"
42+
implementation "org.grails:grails-plugin-interceptors"
43+
implementation "org.grails:grails-web-boot"
44+
implementation "org.grails.plugins:async"
45+
implementation "org.grails.plugins:scaffolding"
46+
implementation "org.grails.plugins:events"
47+
implementation "org.grails.plugins:hibernate5"
48+
implementation "org.hibernate:hibernate-core-jakarta:$hibernateCoreVersion"
49+
implementation "org.grails.plugins:gsp"
5150
console "org.grails:grails-console"
5251
profile "org.grails.profiles:web"
53-
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.7"
54-
runtime "org.glassfish.web:el-impl:2.1.2-b03"
55-
runtime "org.apache.tomcat:tomcat-jdbc"
56-
runtime "com.h2database:h2"
57-
testCompile "org.grails:grails-gorm-testing-support"
58-
testCompile "org.grails:grails-web-testing-support"
59-
testCompile "io.micronaut:micronaut-http-client:$micronautVersion"
60-
testCompile "org.grails.plugins:geb"
61-
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.6.0"
62-
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.6.0"
63-
testCompile "org.seleniumhq.selenium:selenium-api:3.6.0"
64-
compile project(':spring-security-acl')
65-
}
66-
67-
bootRun {
68-
jvmArgs('-Dspring.output.ansi.enabled=always')
69-
sourceResources sourceSets.main
70-
}
52+
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:5.0.1"
53+
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
54+
runtimeOnly "com.h2database:h2"
55+
testImplementation "org.grails:grails-gorm-testing-support"
56+
testImplementation "org.grails:grails-web-testing-support"
57+
integrationTestImplementation testFixtures('org.grails.plugins:geb')
7158

72-
webdriverBinaries {
73-
chromedriver '2.35'
74-
geckodriver '0.18.0'
59+
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
60+
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
61+
testRuntimeOnly "org.seleniumhq.selenium:selenium-safari-driver:$seleniumVersion"
62+
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
63+
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
64+
implementation project(':spring-security-acl')
7565
}
7666

7767
tasks.withType(Test) {
68+
useJUnitPlatform()
7869
systemProperty "geb.env", System.getProperty('geb.env')
79-
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
80-
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
70+
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
71+
if (System.getenv('CHROMEWEBDRIVER')) {
72+
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
73+
}
74+
if (System.getenv('GECKOWEBDRIVER')) {
75+
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
76+
}
77+
8178
beforeTest { descriptor -> logger.quiet " -- $descriptor" }
8279
testLogging {
8380
events "passed", "skipped", "failed"

0 commit comments

Comments
 (0)