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

Merge sitemesh3 grails plugin into grails-gsp #562

Merged
merged 141 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from 131 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
15adc2e
Initial commit
codeconsole Jul 27, 2023
d1b9713
grails create-web-plugin org.sitemesh.grails.plugins.sitemesh3.sitemesh3
codeconsole Jul 27, 2023
459c767
Initial plugin.
codeconsole Jul 27, 2023
5ac65f4
Create demo
codeconsole Jul 27, 2023
539e8b4
Update README.md
codeconsole Jul 27, 2023
2ddb1fe
Simplify configuration by taking advantage of the layoutViewResolver …
codeconsole Jul 27, 2023
2d696f0
Use same <meta name=layout content=.../> convention as Grails
codeconsole Jul 27, 2023
cd6e54c
Link to Grails SiteMesh 3 issue
codeconsole Jul 27, 2023
708dca6
Body tag id/class/style merging.
codeconsole Jul 28, 2023
ae83e8d
Allow publishToMavenLocal
codeconsole Jul 28, 2023
1fa6914
remove unused mapping
codeconsole Jul 28, 2023
dee5454
Filter must be ordered before grailsWebRequestFilter.
codeconsole Jul 28, 2023
44fafee
Use path prefixes, use layout meta tag and support current version of…
codeconsole Jul 30, 2023
e8e5fef
Update README.md - Installation instructions
codeconsole Jul 30, 2023
0c55724
Force grails.gsp.view.layoutViewResolver = true
codeconsole Jul 31, 2023
5c9b74f
Update README.md simplified installation
codeconsole Jul 31, 2023
1a6fd53
Update README.md add pull references
codeconsole Jul 31, 2023
a8e46c7
Register TagLibs last so the override any existing ones in classpath
codeconsole Jul 31, 2023
fd9a8c3
Remove comments
codeconsole Jul 31, 2023
44d6a71
Remove jsp fix code.
codeconsole Jul 31, 2023
590d336
Remove unused imports
codeconsole Jul 31, 2023
c5b8d5c
Remove unnecessary comments.
codeconsole Jul 31, 2023
664e7c7
Fix formatting
codeconsole Aug 1, 2023
14458c8
Update README.md remove obvious comments
codeconsole Aug 1, 2023
21b2e13
Update README.md grammar
codeconsole Aug 1, 2023
eaf1906
JSP demo. Revert 6.0.1-SNAPSHOT dependency.
codeconsole Aug 2, 2023
9fcde6d
Change plugin to use spring-boot-starter-sitemesh
codeconsole Aug 3, 2023
f17ecb4
Revert rte if sitemesh 2 lib is installed.
codeconsole Aug 3, 2023
eb4402e
Tag lib loading order no longer important as conflicting tags are now…
codeconsole Aug 3, 2023
67e5bf3
Remove need for opensymphony:sitemesh and org.grails:grails-web-sitemesh
codeconsole Aug 3, 2023
1b22b54
2.0-SNAPSHOT
codeconsole Aug 3, 2023
f911e2b
Update 2.x doc
codeconsole Aug 3, 2023
7bdc030
Update README.md
codeconsole Aug 4, 2023
0c1e046
Set sourceCompatibility for all projects
codeconsole Aug 10, 2023
b49cd10
Update readme
codeconsole Aug 10, 2023
68bd90d
Use HandlerMapping instead of Controller for Layouts
codeconsole Aug 12, 2023
abf21bc
Test on port 8081
codeconsole Aug 12, 2023
ffee72a
Add codecLookup for render
codeconsole Aug 12, 2023
04b3940
Demo 404 and 500 error pages
codeconsole Aug 12, 2023
0d4e581
Use gsp plugin 6.0.1
codeconsole Aug 12, 2023
879db0d
remove influences
codeconsole Aug 12, 2023
ae50a10
StandaloneTagLibraryLookup no longer needed.
codeconsole Aug 12, 2023
f583e96
Exclude demo assets from plugin distribution.
codeconsole Aug 12, 2023
6ec269d
unneeded
codeconsole Aug 12, 2023
418c747
Exclude BootStrap
codeconsole Aug 13, 2023
7748be3
g:pageProperty g:ifPageProperty support.
codeconsole Aug 13, 2023
d0a43c0
Test utilizing Controller to render 500 error
codeconsole Aug 14, 2023
abf66d4
Reflect releases
codeconsole Aug 22, 2023
c93233e
Rename sitemesh2 jar to adapter jar
codeconsole Aug 22, 2023
94bbb19
reflect sitemesh3 release
codeconsole Aug 22, 2023
dbbf18a
Remove reference to 1.x
codeconsole Aug 22, 2023
97817f4
Rename ErrorController to DemoController
codeconsole Aug 22, 2023
6a0f441
JSP, attribute decorator, and chainging demo.
codeconsole Aug 23, 2023
6340ffb
SiteMesh 3.1.0-M2
codeconsole Aug 28, 2023
6134ff6
Document references. Remove constructor for stub.
codeconsole Sep 8, 2023
9d018e9
Remove need for adapter jar. g:applyLayout support. Limit dependencie…
codeconsole Sep 26, 2023
8699a0e
Update README.md
codeconsole Sep 26, 2023
38995fb
Use grails-gsp 6.0.3
codeconsole Sep 28, 2023
5acba09
Content tag support
codeconsole Sep 30, 2023
d9e14ea
Use SiteMeshFilter properties for applyLayout tag
codeconsole Oct 1, 2023
898e97a
Ignore sitemesh:write tag because it is handled by SiteMesh
codeconsole Oct 1, 2023
27e28c5
Exclude unneeded micronaut dependencies
codeconsole Oct 2, 2023
5a3e13b
Use grails-gsp 6.0.4-SNAPSHOT
codeconsole Oct 2, 2023
f509f5e
Disable sitemesh 2 gsp preprocessing
codeconsole Oct 2, 2023
289d8f3
Disable 'application' default layout unless set in config. Return 404…
codeconsole Oct 5, 2023
016e04f
Exclude grails-web-sitemesh and sitemesh2 from dependencies
codeconsole Oct 18, 2023
4046522
Exclude configuration properties already set.
codeconsole Oct 18, 2023
9b9ed40
Automate snapshot build publishing
codeconsole Oct 18, 2023
98bef36
Get SNAPSHOT for repo. Update tagRuleBundles to reflect latest version
codeconsole Oct 25, 2023
7ee75f9
Grails 6.1.0
codeconsole Nov 4, 2023
7735afb
Update README to reflect 6.1.0
codeconsole Nov 4, 2023
52a70fb
Use Sitemesh 3.1.0
codeconsole Jan 24, 2024
d3451ea
Log SiteMesh version on startup
codeconsole Jan 24, 2024
4293657
Grails 6.1.1
codeconsole Jan 24, 2024
0181cfe
Update publishing info
codeconsole Feb 12, 2024
eba176e
Grails 6.1.2
codeconsole Feb 12, 2024
a26132e
6.1.2
codeconsole Feb 12, 2024
c0b208f
Add javadocs
codeconsole Feb 13, 2024
4080fe0
Update README.md
codeconsole Feb 13, 2024
fbe60bc
SiteMesh 3.1.1
codeconsole Mar 19, 2024
6677be9
Grails 6.2.0 / SiteMesh 3.1.1
codeconsole Apr 29, 2024
1ea4d0e
Update readme
codeconsole Apr 29, 2024
9704247
jdk 17
codeconsole Apr 29, 2024
baaf058
Grails 7 Jakarta
codeconsole Sep 12, 2024
4cc4aec
7.0 Cleanup
codeconsole Sep 15, 2024
d2f0773
Set snapsgot
codeconsole Sep 17, 2024
835d785
Set asset pipeline version
codeconsole Sep 17, 2024
5f1d7c7
Update docs
codeconsole Sep 17, 2024
2731dad
Adapter no longer needed with 7
codeconsole Sep 17, 2024
fe4359b
Use grails-core attribute
codeconsole Sep 20, 2024
1e5e552
Use grails-core attribute
codeconsole Sep 20, 2024
bf8fe81
Set filter position and only process forwarded request
codeconsole Oct 2, 2024
7c7511b
Higher order should be maintained so that all error pages can be deco…
codeconsole Oct 8, 2024
5a7d780
Use filter position relative to other grails filters.
codeconsole Oct 25, 2024
67029a3
groovydoc depends on jar task
codeconsole Oct 25, 2024
be257fa
javadoc depends on jar task
codeconsole Oct 25, 2024
a629dbc
order should be numerical
codeconsole Oct 25, 2024
e691815
Support constructor initialization
codeconsole Nov 11, 2024
c8e9b5e
Gradle 8.11
codeconsole Nov 11, 2024
d0512de
sdmanrc
codeconsole Nov 11, 2024
9172427
ConfigurableSiteMeshFilter sitched to SiteMeshFilter
codeconsole Nov 11, 2024
699c49a
Simplifly build
codeconsole Nov 11, 2024
b122e2c
Groovy 4.0.24
codeconsole Nov 12, 2024
baa436f
GrailsFilters new location
codeconsole Nov 12, 2024
e198b1a
Get rid of buildSrc
codeconsole Nov 12, 2024
7a32e4b
use liberica to build and publish
codeconsole Nov 12, 2024
667531d
Min version 7
codeconsole Nov 12, 2024
06c15ca
Apply org.grails.grails-plugin
codeconsole Nov 12, 2024
ccbbff7
Address warning messages
codeconsole Nov 15, 2024
b95f5d5
GrailsFilters package change
codeconsole Nov 19, 2024
84a0e32
Use servletPath instead of uri
codeconsole Nov 22, 2024
23ef83b
SiteMesh 3.2.2
codeconsole Dec 12, 2024
e70557b
Asset Pipeline 5.0.3
codeconsole Dec 12, 2024
7464298
renderText example
codeconsole Dec 12, 2024
bc282dc
Gradle 8.11.1
codeconsole Dec 13, 2024
6c0067f
asset-pipeline 5.0.4
codeconsole Dec 13, 2024
747301b
support deploying to github maven repo
codeconsole Dec 13, 2024
1dcf01c
7.0.0-M1
codeconsole Dec 13, 2024
90db982
Set GSP version to 7.0.0-M1
codeconsole Dec 20, 2024
b2f55a1
Remove unneeded dependencyManagement block
codeconsole Dec 20, 2024
2451e07
Imported sitemesh3 plugin
jdaugherty Jan 9, 2025
a0ffa1a
Project clean up
jdaugherty Jan 11, 2025
56513bb
refactor: decouple `JspFragmentImpl` from 'grails-encoder'
matrei Jan 13, 2025
d082562
fix: conditionally register `JspTagLibraryResolver` if present
matrei Jan 13, 2025
4fdec3b
test: fix faulty log pattern in test application
matrei Jan 13, 2025
124129f
test: cleanup test application
matrei Jan 13, 2025
53cee6e
build: streamline build and sort out dependencies
matrei Jan 13, 2025
db24b34
build: comment out transitive dependency exclusions
matrei Jan 13, 2025
701174a
build: use task names instead of tasks for groovydoc
matrei Jan 13, 2025
0b09121
Revert "refactor: decouple `JspFragmentImpl` from 'grails-encoder'"
matrei Jan 13, 2025
02934a8
build: update comment about used classes
matrei Jan 13, 2025
dc0d621
docs: change groovydoc access to protected
matrei Jan 13, 2025
04110df
build: resolve Groovy version for guide links
matrei Jan 14, 2025
9ec73b2
build: use Groovy version from the BOM for groovydoc generation
matrei Jan 14, 2025
2090dda
build: adjust log level and use lazy evaluation for resolved Groovy v…
matrei Jan 14, 2025
7bfe582
build: include `grails-plugin-codecs` dependency
matrei Jan 14, 2025
e561f1a
build: include `jansi` in sitemesh3 example app
matrei Jan 14, 2025
88f88c7
build: include `grails-plugin-codecs` in `grails-plugin-gsp`
matrei Jan 14, 2025
71bcc6d
build: include `grails-plugin-rest` in sitemesh3 example app
matrei Jan 14, 2025
7b2a22f
Remove unneeded comment
jdaugherty Jan 15, 2025
e45baea
Merge remote-tracking branch 'upstream/7.0.x' into 7.0.x
jdaugherty Jan 15, 2025
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
446 changes: 23 additions & 423 deletions build.gradle

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions docs/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import grails.doc.gradle.PublishGuide

buildscript {
repositories {
maven { url = 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath "org.grails:grails-docs:$grailsVersion"
}
}

apply plugin: 'groovy'

// TODO: PublishGuide should eventually ensure the build directory exists
tasks.register('docsBuild') {
doFirst {
project.layout.buildDirectory.get().asFile.mkdirs()
}
// Do not cache this task since the directory must exist if publishGuide is going to run
outputs.upToDateWhen { false }
}

tasks.register('publishGuide', PublishGuide) {
group = 'documentation'
description = 'Generate Guide'
dependsOn('docsBuild')

targetDir = project.layout.buildDirectory.dir('docs').get().asFile
outputs.dir(targetDir) // ensure gradle understands what this task generates
sourceRepo = "https://github.com/grails/grails-gsp/edit/${githubBranch}/src/main/docs"
sourceDir = project.layout.projectDirectory.dir('src/main/docs').getAsFile()
inputs.dir(sourceDir) // ensure gradle understands what this task creates from
propertiesFiles = [rootProject.layout.projectDirectory.file('gradle.properties').asFile]
asciidoc = true
resourcesDir = project.file('src/main/docs/resources')
properties = [
'safe' : 'UNSAFE', // Make sure any asciidoc security is disabled
'version' : projectVersion,
'title' : 'Groovy Server Pages (GSP)',
'subtitle' : 'GSP (Groovy Server Pages) - A server-side view rendering technology based on Groovy',
// TODO: The javaee documentation has not been updated to jakarta
'javaee' : 'https://docs.oracle.com/javaee/7/api/',
'jakartaee' : 'https://jakarta.ee/specifications/platform/10/apidocs/',
'javase' : 'https://docs.oracle.com/en/java/javase/17/docs/api/index.html',
'groovyapi' : "https://docs.groovy-lang.org/latest/html/gapi/",
matrei marked this conversation as resolved.
Show resolved Hide resolved
'groovyjdk' : "https://docs.groovy-lang.org/latest/html/groovy-jdk/",
'grailsapi' : "https://docs.grails.org/$grailsVersion/api/",
'grailsdocs' : "https://docs.grails.org/$grailsVersion/",
'gormapi' : 'https://gorm.grails.org/latest/api/',
'springapi' : 'https://docs.spring.io/spring/docs/current/javadoc-api/',
'commandLineRef': "https://docs.grails.org/$grailsVersion/ref/Command%20Line",
'controllersRef': "https://docs.grails.org/$grailsVersion/ref/Controllers"
] as Properties

doLast {
File destination = project.layout.buildDirectory.file('docs/guide/index.html').get().asFile
destination.delete()
project.layout.buildDirectory.file('docs/guide/single.html').get().asFile.renameTo(destination)
project.layout.buildDirectory.file('docs/index.html').get().asFile.text = '''
<html lang="en">
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0; url=guide/index.html" />
</head>
<body></body>
</html>
'''.stripIndent(8)
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<tr>
<td id="col1">
<div id="main" class="corner-all">

<div class="project">
<h1>${title.encodeAsHtml()}</h1>
<p></p>
Expand Down
8 changes: 8 additions & 0 deletions examples/sitemesh3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SiteMesh 3 Grails Plugin Example
Example using the SiteMesh 3 Grails Plugin on how to use [SiteMesh 3](https://github.com/sitemesh/sitemesh3)

## Want to See the Full Power for Sitemesh 3?
Check out using SiteMesh 3 layouts on GSP and JSP pages, error pages, specifying layouts in controllers, and even applying multiple layouts to the same view!

You can see a working example by running this plugin:
```./gradlew bootRun```
43 changes: 43 additions & 0 deletions examples/sitemesh3/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
buildscript {
repositories {
maven { url = 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath platform("org.grails:grails-bom:$grailsVersion")
classpath 'org.grails:grails-gradle-plugin'
}
}

version = '0.0.1'
group = 'org.sitemesh.grails.plugins.sitemesh3'

apply plugin: 'org.grails.grails-web'
apply plugin: 'org.grails.grails-gsp'

dependencies {

implementation platform("org.grails:grails-bom:$grailsVersion")

implementation project(':grails-plugin-sitemesh3')
implementation 'org.grails:grails-core'
implementation 'org.grails:grails-plugin-controllers'

runtimeOnly project(':grails-plugin-gsp')
runtimeOnly 'com.bertramlabs.plugins:asset-pipeline-grails'
runtimeOnly 'org.grails:grails-plugin-url-mappings'
runtimeOnly 'org.grails:grails-plugin-i18n'
runtimeOnly 'org.springframework.boot:spring-boot-autoconfigure'
runtimeOnly 'org.springframework.boot:spring-boot-starter-logging'
runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'

// JSP support
runtimeOnly 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api'
runtimeOnly 'org.apache.tomcat.embed:tomcat-embed-jasper'
runtimeOnly 'org.glassfish.web:jakarta.servlet.jsp.jstl'

integrationTestImplementation testFixtures('org.grails.plugins:geb')
integrationTestImplementation 'org.grails:grails-testing-support'
}

apply from: rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
apply from: rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
27 changes: 27 additions & 0 deletions examples/sitemesh3/grails-app/assets/images/advancedgrails.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions examples/sitemesh3/grails-app/assets/images/documentation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading