diff --git a/build.gradle b/build.gradle index 5d49027008..3ec7268acb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,15 @@ buildscript { repositories { - mavenCentral() maven { url "https://repo.grails.org/grails/core" } - maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion" - classpath "org.grails:grails-docs:${project.ext.properties.grailsDocsVersion ?: grailsVersion}" + classpath platform("org.grails:grails-bom:$grailsVersion") classpath "io.github.gradle-nexus:publish-plugin:2.0.0" } } ext { - isCiBuild = System.getenv().get("TRAVIS") == 'true' || (System.getenv().get("CI") as Boolean) + isCiBuild = (System.getenv().get("CI") as Boolean) isSnapshot = project.projectVersion.endsWith('-SNAPSHOT') isReleaseVersion = !isSnapshot } @@ -21,12 +18,6 @@ group = "org.grails" version project.projectVersion apply plugin: 'java-library' -apply plugin: 'groovy' - -ext.set('signing.keyId', project.findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY')) -ext.set('signing.secretKeyRingFile', project.findProperty('signing.secretKeyRingFile') ?: "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg") -ext.set('signing.password', project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')) - apply plugin: 'idea' allprojects { prj -> @@ -41,19 +32,8 @@ allprojects { prj -> } } - if (System.getenv("GITHUB_MAVEN_PASSWORD") && prj.name == 'grails-plugin-gsp' && !sitemeshVersion.endsWith('-SNAPSHOT')) { - System.out.println("Adding Sitemesh Repo") - maven { - url = 'https://maven.pkg.github.com/codeconsole/grails-plugin-sitemesh3' - credentials { - username = 'DOES_NOT_MATTER' - password = System.getenv("GITHUB_MAVEN_PASSWORD") - } - } - } - if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) { - System.out.println("Adding Grails Core Repo") + System.out.println("Adding Grails Core Repo for project: ${prj.name}") maven { url = 'https://maven.pkg.github.com/grails/grails-core' credentials { @@ -63,368 +43,11 @@ allprojects { prj -> } } } -} - -subprojects { subproject -> - - version project.projectVersion - - ext { - userOrg = "grails" - isGrailsPlugin = name.startsWith('grails-plugin') - isBuildSnapshot = version.toString().endsWith("-SNAPSHOT") - } - - if (isGrailsPlugin) { - group "org.grails.plugins" - } else { - group "org.grails" - } - - if (subproject.name.startsWith("examples")) { - apply plugin: "org.grails.grails-web" - } else if (isGrailsPlugin) { - apply plugin: "org.grails.grails-plugin" - } else { - apply plugin: 'groovy' - apply plugin: 'java-library' - - configurations { - documentation - } - - dependencies { - implementation platform("org.grails:grails-bom:$grailsVersion") - - api "org.apache.groovy:groovy:$groovyVersion" - - testImplementation "org.spockframework:spock-core" - testImplementation "org.springframework:spring-test" - - documentation platform("org.grails:grails-bom:$grailsVersion") - documentation "org.fusesource.jansi:jansi" - } - - test { - testLogging { - events "passed", "skipped", "failed", "standardOut", "standardError" - } - } - - groovydoc.classpath += (configurations.documentation + configurations.compileClasspath) - - dependencies { - documentation "org.apache.groovy:groovy-dateutil:$groovyVersion" - } - } - - apply plugin: 'idea' - apply plugin: 'java-library' - - compileJava.options.release = 17 - - dependencies { - compileOnly "jakarta.servlet:jakarta.servlet-api" - - testImplementation "jakarta.servlet:jakarta.servlet-api" - compileOnly "jakarta.persistence:jakarta.persistence-api" - testImplementation "org.apache.groovy:groovy-test-junit5:$groovyVersion" - testImplementation "org.junit.jupiter:junit-jupiter-api" - testImplementation "org.junit.platform:junit-platform-runner" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" - } - - tasks.withType(Test) { - useJUnitPlatform() - testLogging { - showStandardStreams = true - exceptionFormat = 'full' - } - if (isCiBuild) { - maxParallelForks = 2 - } else { - maxParallelForks = 4 - } - } - - configurations { - documentation - } - - dependencies { - if (configurations.find { subproject.name == 'documentation' }) { - documentation "org.fusesource.jansi:jansi" - documentation "jline:jline" - documentation "com.github.javaparser:javaparser-core" - documentation "org.apache.groovy:groovy:$groovyVersion" - documentation "org.apache.groovy:groovy-ant:$groovyVersion" - documentation "org.apache.groovy:groovy-dateutil:$groovyVersion" - documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion" - documentation "org.asciidoctor:asciidoctorj" - } - } - - groovydoc.classpath += configurations.documentation - - ext { - isExample = subproject.name.startsWith('example') - isGrailsPlugin = subproject.name.startsWith('grails-plugin') - pomInfo = { - delegate.name subproject.title - delegate.description subproject.projectDesc - delegate.url projectUrl - - delegate.licenses { - delegate.license { - delegate.name 'The Apache Software License, Version 2.0' - delegate.url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - delegate.distribution 'repo' - } - } - - delegate.scm { - delegate.url "scm:git@github.com:${githubSlug}.git" - delegate.connection "scm:git@github.com:${githubSlug}.git" - delegate.developerConnection "scm:git@github.com:${githubSlug}.git" - } - - if (developers) { - delegate.developers { - for (dev in developers.split(',')) { - delegate.developer { - delegate.id dev.toLowerCase().replace(' ', '') - delegate.name dev - } - } - } - } - } - } - - if (!isExample) { - - apply plugin: 'maven-publish' - apply plugin: 'signing' - - Task sourcesJar = subproject.tasks.findByName("sourcesJar") - if (!sourcesJar) { - sourcesJar = tasks.create("sourcesJar", Jar) { - archiveClassifier = 'sources' - group = BasePlugin.BUILD_GROUP - description = 'Assembles a jar archive containing the main sources of this project.' - from subproject.sourceSets.main.allSource - } - } - - Task javadocJar = subproject.tasks.findByName("javadocJar") - if (!javadocJar) { - javadocJar = tasks.create("javadocJar", Jar) { - archiveClassifier = 'javadoc' - group = BasePlugin.BUILD_GROUP - description = 'Assembles a jar archive containing the generated Javadoc API documentation of this project.' - from subproject.plugins.hasPlugin(GroovyPlugin) ? subproject.tasks.getByName(GroovyPlugin.GROOVYDOC_TASK_NAME) : subproject.tasks.getByName(JavaPlugin.JAVADOC_TASK_NAME) - } - } - tasks.findByName("assemble").finalizedBy(sourcesJar, javadocJar) - - publishing { - if (isSnapshot) { - repositories { - maven { - credentials { - def u = System.getenv('ARTIFACTORY_USERNAME') ?: project.findProperty('artifactoryPublishUsername') ?: '' - def p = System.getenv('ARTIFACTORY_PASSWORD') ?: project.findProperty('artifactoryPublishPassword') ?: '' - username = u - password = p - } - if (isGrailsPlugin) { - url "https://repo.grails.org/grails/plugins3-snapshots-local" - } else { - url "https://repo.grails.org/grails/libs-snapshots-local" - } - } - } - } - - publications { - maven(MavenPublication) { - if (isGrailsPlugin) { - artifactId(subproject.name - 'grails-plugin-') - } else if (subproject.name.contains('/')) { - artifactId(subproject.name.substring(subproject.name.indexOf('/') + 1)) - } - - from components.java - - artifact sourcesJar - artifact javadocJar - - if (isGrailsPlugin) { - artifact source: "${subproject.buildDir}/classes/groovy/main/META-INF/grails-plugin.xml", - classifier: "plugin", - extension: 'xml' - } - pom.withXml { - def xml = asNode() - - xml.children().last() + pomInfo - // dependency management shouldn't be included - def n = xml.get("dependencyManagement") - if (n) xml.remove(n) - } - - } - } - } - - subproject.afterEvaluate { - signing { - required { isReleaseVersion } - sign publishing.publications.maven - } - } - - tasks.withType(Sign) { - onlyIf { isReleaseVersion } - } - - //do not generate extra load on Nexus with new staging repository if signing fails - tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach { - shouldRunAfter(tasks.withType(Sign)) - } - } - } - -def DOCUMENTATION_GROUP = 'Documentation' - -def commonGithubOrg = 'grails' -def commonGithubSlug = 'grails-common-build' -def commonBranch = 'master' -def docResourcesDir = "${buildDir}/resources/${commonGithubSlug}-${commonBranch}/src/main/resources" - -task prepareDocResources { - group = DOCUMENTATION_GROUP - description = 'Downloads common documentation resoruces and unzips them to build folder' - doLast { - ant.mkdir(dir: buildDir) - ant.get(src: "https://github.com/${commonGithubOrg}/${commonGithubSlug}/archive/${commonBranch}.zip", dest: "${buildDir}/resources.zip") - ant.unzip(src: "${buildDir}/resources.zip", dest: "${buildDir}/resources") - } -} - -task copyLocalDocResources(type: Copy, dependsOn: prepareDocResources) { - group = DOCUMENTATION_GROUP - description = 'Copy local resources to build folder' - mustRunAfter prepareDocResources - from('src/main/docs/resources') - into docResourcesDir -} - -configurations { - documentation -} - -dependencies { - if (configurations.find { it.name == 'documentation' }) { - documentation platform("org.grails:grails-bom:$grailsVersion") - documentation "info.picocli:picocli" - documentation "org.fusesource.jansi:jansi" - documentation "jline:jline" - documentation "com.github.javaparser:javaparser-core" - documentation "org.apache.groovy:groovy:$groovyVersion" - documentation "org.apache.groovy:groovy-ant:$groovyVersion" - documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion" - documentation "org.asciidoctor:asciidoctorj" - } -} - -def cleanTask = project.tasks.findByName("clean") -if (cleanTask == null) { - task clean(type: Delete) { - delete(buildDir) - } -} else { - cleanTask.doLast { - ant.delete(dir: "build/docs") - } -} - -tasks.withType(Groovydoc) { - group = DOCUMENTATION_GROUP - docTitle = "${project.title} - ${project.version}" - destinationDir = project.file("build/docs/api") - def files = [] - project.rootProject.subprojects - .findAll { it.name != 'docs' && !it.name.startsWith('examples') } - .each { subproject -> - if (subproject.file('src/main/groovy').exists()) { - files += subproject.files("src/main/groovy") - } - } - if (project.file('src/main/groovy').exists()) { - files += project.files("src/main/groovy") - } - source = files - classpath += configurations.documentation + apply plugin: 'groovy' } -task publishGuide(type: grails.doc.gradle.PublishGuide) { - group = DOCUMENTATION_GROUP - description = 'Generate Guide' - dependsOn copyLocalDocResources, compileGroovy, groovydoc, compileJava, processResources - - targetDir = project.file("${buildDir}/docs") - sourceRepo = "https://github.com/${githubSlug}/edit/${githubBranch}/src/main/docs" - sourceDir = new File(projectDir, "src/main/docs") - propertiesFiles = [new File(rootProject.projectDir, "gradle.properties")] - asciidoc = true - resourcesDir = project.file(docResourcesDir) - properties = ['safe' : 'UNSAFE', - 'version' : project.version, - 'subtitle' : project.projectDesc, - 'api' : '../api', - 'sourceDir': rootProject.projectDir.absolutePath, - 'sourcedir': rootProject.projectDir.absolutePath, - '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': 'http://docs.groovy-lang.org/latest/html/gapi/', - 'grailsapi': 'http://docs.grails.org/latest/api/', - 'gormapi' : 'http://gorm.grails.org/latest/api/', - 'springapi': 'https://docs.spring.io/spring/docs/current/javadoc-api/'] - doLast { - ant.move(file: "${project.buildDir}/docs/guide/single.html", - tofile: "${project.buildDir}/docs/guide/index.html", overwrite: true) - new File(project.buildDir, "docs/index.html").text = ''' - - - - - - - - -''' - } -} - -task docs(dependsOn: [groovydoc, publishGuide]) { - group = DOCUMENTATION_GROUP -} - -def assembleTask = project.tasks.findByName("assemble") -if (assembleTask == null) { - task assemble(dependsOn: docs, type: Zip) { - baseName = "${project.name}-${project.version}" - destinationDir = new File(project.buildDir, "distributions") - from project.files("${buildDir}/docs") - } -} - - if (isReleaseVersion) { - apply plugin: 'maven-publish' apply plugin: "io.github.gradle-nexus.publish-plugin" nexusPublishing { @@ -444,20 +67,11 @@ if (isReleaseVersion) { delayBetween.set(java.time.Duration.ofMillis(4000)) } } -} -tasks.named('publishGuide') { - // Override value defined in grails/grails-common-build/common-docs.gradle - it.properties['commandLineRef'] = "https://docs.grails.org/$grailsVersion/ref/Command%20Line" - it.properties['controllersRef'] = "https://docs.grails.org/$grailsVersion/ref/Controllers" - it.properties['grailsapi'] = "https://docs.grails.org/$grailsVersion/api/" - it.properties['grailsdocs'] = "https://docs.grails.org/$grailsVersion/" - it.properties['groovyapi'] = "https://docs.groovy-lang.org/$groovyVersion/html/gapi/" - it.properties['groovyjdk'] = "https://docs.groovy-lang.org/$groovyVersion/html/groovy-jdk/" - it.properties['javase'] = 'https://docs.oracle.com/en/java/javase/11/docs/api/' -} - -boolean isNonStable(String version) { - version ==~ /(?i).+(-|\.?)(b|M|RC|Dev)\d?.*/ || ['alpha', 'beta', 'milestone', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier -> version ==~ /(?i).*[.-]$qualifier[.\d-+]*/ + //do not generate extra load on Nexus with new staging repository if signing fails + tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach { + shouldRunAfter(tasks.withType(Sign)) } } + +apply from: rootProject.layout.projectDirectory.file('gradle/aggregate-groovydoc.gradle') \ No newline at end of file diff --git a/docs/build.gradle b/docs/build.gradle new file mode 100644 index 0000000000..bd5034669d --- /dev/null +++ b/docs/build.gradle @@ -0,0 +1,77 @@ +import grails.doc.gradle.PublishGuide + +buildscript { + repositories { + mavenLocal() + maven { url "https://repo.grails.org/grails/core" } + } + dependencies { + classpath platform("org.grails:grails-bom:$grailsVersion") + classpath "org.grails:grails-docs" + } +} + +version rootProject.version + +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) { + dependsOn 'docsBuild' + + group = JavaBasePlugin.DOCUMENTATION_GROUP + description = 'Generate Guide' + + 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' : project.version, + '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 jakarata + '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/$groovyVersion/html/gapi/", + 'groovyjdk' : "https://docs.groovy-lang.org/$groovyVersion/html/groovy-jdk/", + 'grailsapi' : "https://docs.grails.org/$grailsVersion/api/", + 'grailsdocs' : "https://docs.grails.org/$grailsVersion/", + 'gormapi' : 'http://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 = ''' + + + + + + + + +''' + } +} \ No newline at end of file diff --git a/src/main/docs/guide/GSPBasics.adoc b/docs/src/main/docs/guide/GSPBasics.adoc similarity index 100% rename from src/main/docs/guide/GSPBasics.adoc rename to docs/src/main/docs/guide/GSPBasics.adoc diff --git a/src/main/docs/guide/GSPBasics/expressions.adoc b/docs/src/main/docs/guide/GSPBasics/expressions.adoc similarity index 100% rename from src/main/docs/guide/GSPBasics/expressions.adoc rename to docs/src/main/docs/guide/GSPBasics/expressions.adoc diff --git a/src/main/docs/guide/GSPBasics/logicAndIteration.adoc b/docs/src/main/docs/guide/GSPBasics/logicAndIteration.adoc similarity index 100% rename from src/main/docs/guide/GSPBasics/logicAndIteration.adoc rename to docs/src/main/docs/guide/GSPBasics/logicAndIteration.adoc diff --git a/src/main/docs/guide/GSPBasics/pageDirectives.adoc b/docs/src/main/docs/guide/GSPBasics/pageDirectives.adoc similarity index 100% rename from src/main/docs/guide/GSPBasics/pageDirectives.adoc rename to docs/src/main/docs/guide/GSPBasics/pageDirectives.adoc diff --git a/src/main/docs/guide/GSPBasics/variablesAndScopes.adoc b/docs/src/main/docs/guide/GSPBasics/variablesAndScopes.adoc similarity index 100% rename from src/main/docs/guide/GSPBasics/variablesAndScopes.adoc rename to docs/src/main/docs/guide/GSPBasics/variablesAndScopes.adoc diff --git a/src/main/docs/guide/introduction.adoc b/docs/src/main/docs/guide/introduction.adoc similarity index 100% rename from src/main/docs/guide/introduction.adoc rename to docs/src/main/docs/guide/introduction.adoc diff --git a/src/main/docs/guide/layouts.adoc b/docs/src/main/docs/guide/layouts.adoc similarity index 100% rename from src/main/docs/guide/layouts.adoc rename to docs/src/main/docs/guide/layouts.adoc diff --git a/src/main/docs/guide/makingChangesToADeployedApplication.adoc b/docs/src/main/docs/guide/makingChangesToADeployedApplication.adoc similarity index 100% rename from src/main/docs/guide/makingChangesToADeployedApplication.adoc rename to docs/src/main/docs/guide/makingChangesToADeployedApplication.adoc diff --git a/src/main/docs/guide/resources.adoc b/docs/src/main/docs/guide/resources.adoc similarity index 100% rename from src/main/docs/guide/resources.adoc rename to docs/src/main/docs/guide/resources.adoc diff --git a/src/main/docs/guide/sitemeshContentBlocks.adoc b/docs/src/main/docs/guide/sitemeshContentBlocks.adoc similarity index 100% rename from src/main/docs/guide/sitemeshContentBlocks.adoc rename to docs/src/main/docs/guide/sitemeshContentBlocks.adoc diff --git a/src/main/docs/guide/taglibs.adoc b/docs/src/main/docs/guide/taglibs.adoc similarity index 100% rename from src/main/docs/guide/taglibs.adoc rename to docs/src/main/docs/guide/taglibs.adoc diff --git a/src/main/docs/guide/taglibs/iterativeTags.adoc b/docs/src/main/docs/guide/taglibs/iterativeTags.adoc similarity index 100% rename from src/main/docs/guide/taglibs/iterativeTags.adoc rename to docs/src/main/docs/guide/taglibs/iterativeTags.adoc diff --git a/src/main/docs/guide/taglibs/logicalTags.adoc b/docs/src/main/docs/guide/taglibs/logicalTags.adoc similarity index 100% rename from src/main/docs/guide/taglibs/logicalTags.adoc rename to docs/src/main/docs/guide/taglibs/logicalTags.adoc diff --git a/src/main/docs/guide/taglibs/namespaces.adoc b/docs/src/main/docs/guide/taglibs/namespaces.adoc similarity index 100% rename from src/main/docs/guide/taglibs/namespaces.adoc rename to docs/src/main/docs/guide/taglibs/namespaces.adoc diff --git a/src/main/docs/guide/taglibs/simpleTags.adoc b/docs/src/main/docs/guide/taglibs/simpleTags.adoc similarity index 100% rename from src/main/docs/guide/taglibs/simpleTags.adoc rename to docs/src/main/docs/guide/taglibs/simpleTags.adoc diff --git a/src/main/docs/guide/taglibs/tagReturnValue.adoc b/docs/src/main/docs/guide/taglibs/tagReturnValue.adoc similarity index 100% rename from src/main/docs/guide/taglibs/tagReturnValue.adoc rename to docs/src/main/docs/guide/taglibs/tagReturnValue.adoc diff --git a/src/main/docs/guide/taglibs/taglibVariablesAndScopes.adoc b/docs/src/main/docs/guide/taglibs/taglibVariablesAndScopes.adoc similarity index 100% rename from src/main/docs/guide/taglibs/taglibVariablesAndScopes.adoc rename to docs/src/main/docs/guide/taglibs/taglibVariablesAndScopes.adoc diff --git a/src/main/docs/guide/taglibs/usingJSPTagLibraries.adoc b/docs/src/main/docs/guide/taglibs/usingJSPTagLibraries.adoc similarity index 100% rename from src/main/docs/guide/taglibs/usingJSPTagLibraries.adoc rename to docs/src/main/docs/guide/taglibs/usingJSPTagLibraries.adoc diff --git a/src/main/docs/guide/tags.adoc b/docs/src/main/docs/guide/tags.adoc similarity index 100% rename from src/main/docs/guide/tags.adoc rename to docs/src/main/docs/guide/tags.adoc diff --git a/src/main/docs/guide/tags/formsAndFields.adoc b/docs/src/main/docs/guide/tags/formsAndFields.adoc similarity index 100% rename from src/main/docs/guide/tags/formsAndFields.adoc rename to docs/src/main/docs/guide/tags/formsAndFields.adoc diff --git a/src/main/docs/guide/tags/linksAndResources.adoc b/docs/src/main/docs/guide/tags/linksAndResources.adoc similarity index 100% rename from src/main/docs/guide/tags/linksAndResources.adoc rename to docs/src/main/docs/guide/tags/linksAndResources.adoc diff --git a/src/main/docs/guide/tags/searchAndFiltering.adoc b/docs/src/main/docs/guide/tags/searchAndFiltering.adoc similarity index 100% rename from src/main/docs/guide/tags/searchAndFiltering.adoc rename to docs/src/main/docs/guide/tags/searchAndFiltering.adoc diff --git a/src/main/docs/guide/tags/tagLogicAndIteration.adoc b/docs/src/main/docs/guide/tags/tagLogicAndIteration.adoc similarity index 100% rename from src/main/docs/guide/tags/tagLogicAndIteration.adoc rename to docs/src/main/docs/guide/tags/tagLogicAndIteration.adoc diff --git a/src/main/docs/guide/tags/tagVariablesAndScopes.adoc b/docs/src/main/docs/guide/tags/tagVariablesAndScopes.adoc similarity index 100% rename from src/main/docs/guide/tags/tagVariablesAndScopes.adoc rename to docs/src/main/docs/guide/tags/tagVariablesAndScopes.adoc diff --git a/src/main/docs/guide/tags/tagsAsMethodCalls.adoc b/docs/src/main/docs/guide/tags/tagsAsMethodCalls.adoc similarity index 100% rename from src/main/docs/guide/tags/tagsAsMethodCalls.adoc rename to docs/src/main/docs/guide/tags/tagsAsMethodCalls.adoc diff --git a/src/main/docs/guide/toc.yml b/docs/src/main/docs/guide/toc.yml similarity index 100% rename from src/main/docs/guide/toc.yml rename to docs/src/main/docs/guide/toc.yml diff --git a/src/main/docs/guide/viewsAndTemplates.adoc b/docs/src/main/docs/guide/viewsAndTemplates.adoc similarity index 100% rename from src/main/docs/guide/viewsAndTemplates.adoc rename to docs/src/main/docs/guide/viewsAndTemplates.adoc diff --git a/src/main/docs/ref/Tag Libraries.adoc b/docs/src/main/docs/ref/Tag Libraries.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries.adoc rename to docs/src/main/docs/ref/Tag Libraries.adoc diff --git a/src/main/docs/ref/Tag Libraries/actionName.adoc b/docs/src/main/docs/ref/Tag Libraries/actionName.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/actionName.adoc rename to docs/src/main/docs/ref/Tag Libraries/actionName.adoc diff --git a/src/main/docs/ref/Tag Libraries/controllerName.adoc b/docs/src/main/docs/ref/Tag Libraries/controllerName.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/controllerName.adoc rename to docs/src/main/docs/ref/Tag Libraries/controllerName.adoc diff --git a/src/main/docs/ref/Tag Libraries/flash.adoc b/docs/src/main/docs/ref/Tag Libraries/flash.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/flash.adoc rename to docs/src/main/docs/ref/Tag Libraries/flash.adoc diff --git a/src/main/docs/ref/Tag Libraries/pageScope.adoc b/docs/src/main/docs/ref/Tag Libraries/pageScope.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/pageScope.adoc rename to docs/src/main/docs/ref/Tag Libraries/pageScope.adoc diff --git a/src/main/docs/ref/Tag Libraries/params.adoc b/docs/src/main/docs/ref/Tag Libraries/params.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/params.adoc rename to docs/src/main/docs/ref/Tag Libraries/params.adoc diff --git a/src/main/docs/ref/Tag Libraries/request.adoc b/docs/src/main/docs/ref/Tag Libraries/request.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/request.adoc rename to docs/src/main/docs/ref/Tag Libraries/request.adoc diff --git a/src/main/docs/ref/Tag Libraries/response.adoc b/docs/src/main/docs/ref/Tag Libraries/response.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/response.adoc rename to docs/src/main/docs/ref/Tag Libraries/response.adoc diff --git a/src/main/docs/ref/Tag Libraries/servletContext.adoc b/docs/src/main/docs/ref/Tag Libraries/servletContext.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/servletContext.adoc rename to docs/src/main/docs/ref/Tag Libraries/servletContext.adoc diff --git a/src/main/docs/ref/Tag Libraries/session.adoc b/docs/src/main/docs/ref/Tag Libraries/session.adoc similarity index 100% rename from src/main/docs/ref/Tag Libraries/session.adoc rename to docs/src/main/docs/ref/Tag Libraries/session.adoc diff --git a/src/main/docs/ref/Tags/actionSubmit.adoc b/docs/src/main/docs/ref/Tags/actionSubmit.adoc similarity index 100% rename from src/main/docs/ref/Tags/actionSubmit.adoc rename to docs/src/main/docs/ref/Tags/actionSubmit.adoc diff --git a/src/main/docs/ref/Tags/actionSubmitImage.adoc b/docs/src/main/docs/ref/Tags/actionSubmitImage.adoc similarity index 100% rename from src/main/docs/ref/Tags/actionSubmitImage.adoc rename to docs/src/main/docs/ref/Tags/actionSubmitImage.adoc diff --git a/src/main/docs/ref/Tags/applyLayout.adoc b/docs/src/main/docs/ref/Tags/applyLayout.adoc similarity index 100% rename from src/main/docs/ref/Tags/applyLayout.adoc rename to docs/src/main/docs/ref/Tags/applyLayout.adoc diff --git a/src/main/docs/ref/Tags/checkBox.adoc b/docs/src/main/docs/ref/Tags/checkBox.adoc similarity index 100% rename from src/main/docs/ref/Tags/checkBox.adoc rename to docs/src/main/docs/ref/Tags/checkBox.adoc diff --git a/src/main/docs/ref/Tags/collect.adoc b/docs/src/main/docs/ref/Tags/collect.adoc similarity index 100% rename from src/main/docs/ref/Tags/collect.adoc rename to docs/src/main/docs/ref/Tags/collect.adoc diff --git a/src/main/docs/ref/Tags/cookie.adoc b/docs/src/main/docs/ref/Tags/cookie.adoc similarity index 100% rename from src/main/docs/ref/Tags/cookie.adoc rename to docs/src/main/docs/ref/Tags/cookie.adoc diff --git a/src/main/docs/ref/Tags/country.adoc b/docs/src/main/docs/ref/Tags/country.adoc similarity index 100% rename from src/main/docs/ref/Tags/country.adoc rename to docs/src/main/docs/ref/Tags/country.adoc diff --git a/src/main/docs/ref/Tags/countrySelect.adoc b/docs/src/main/docs/ref/Tags/countrySelect.adoc similarity index 100% rename from src/main/docs/ref/Tags/countrySelect.adoc rename to docs/src/main/docs/ref/Tags/countrySelect.adoc diff --git a/src/main/docs/ref/Tags/createLink.adoc b/docs/src/main/docs/ref/Tags/createLink.adoc similarity index 100% rename from src/main/docs/ref/Tags/createLink.adoc rename to docs/src/main/docs/ref/Tags/createLink.adoc diff --git a/src/main/docs/ref/Tags/createLinkTo.adoc b/docs/src/main/docs/ref/Tags/createLinkTo.adoc similarity index 100% rename from src/main/docs/ref/Tags/createLinkTo.adoc rename to docs/src/main/docs/ref/Tags/createLinkTo.adoc diff --git a/src/main/docs/ref/Tags/currencySelect.adoc b/docs/src/main/docs/ref/Tags/currencySelect.adoc similarity index 100% rename from src/main/docs/ref/Tags/currencySelect.adoc rename to docs/src/main/docs/ref/Tags/currencySelect.adoc diff --git a/src/main/docs/ref/Tags/datePicker.adoc b/docs/src/main/docs/ref/Tags/datePicker.adoc similarity index 100% rename from src/main/docs/ref/Tags/datePicker.adoc rename to docs/src/main/docs/ref/Tags/datePicker.adoc diff --git a/src/main/docs/ref/Tags/each.adoc b/docs/src/main/docs/ref/Tags/each.adoc similarity index 100% rename from src/main/docs/ref/Tags/each.adoc rename to docs/src/main/docs/ref/Tags/each.adoc diff --git a/src/main/docs/ref/Tags/eachError.adoc b/docs/src/main/docs/ref/Tags/eachError.adoc similarity index 100% rename from src/main/docs/ref/Tags/eachError.adoc rename to docs/src/main/docs/ref/Tags/eachError.adoc diff --git a/src/main/docs/ref/Tags/else.adoc b/docs/src/main/docs/ref/Tags/else.adoc similarity index 100% rename from src/main/docs/ref/Tags/else.adoc rename to docs/src/main/docs/ref/Tags/else.adoc diff --git a/src/main/docs/ref/Tags/elseif.adoc b/docs/src/main/docs/ref/Tags/elseif.adoc similarity index 100% rename from src/main/docs/ref/Tags/elseif.adoc rename to docs/src/main/docs/ref/Tags/elseif.adoc diff --git a/src/main/docs/ref/Tags/external.adoc b/docs/src/main/docs/ref/Tags/external.adoc similarity index 100% rename from src/main/docs/ref/Tags/external.adoc rename to docs/src/main/docs/ref/Tags/external.adoc diff --git a/src/main/docs/ref/Tags/field.adoc b/docs/src/main/docs/ref/Tags/field.adoc similarity index 100% rename from src/main/docs/ref/Tags/field.adoc rename to docs/src/main/docs/ref/Tags/field.adoc diff --git a/src/main/docs/ref/Tags/fieldError.adoc b/docs/src/main/docs/ref/Tags/fieldError.adoc similarity index 100% rename from src/main/docs/ref/Tags/fieldError.adoc rename to docs/src/main/docs/ref/Tags/fieldError.adoc diff --git a/src/main/docs/ref/Tags/fieldValue.adoc b/docs/src/main/docs/ref/Tags/fieldValue.adoc similarity index 100% rename from src/main/docs/ref/Tags/fieldValue.adoc rename to docs/src/main/docs/ref/Tags/fieldValue.adoc diff --git a/src/main/docs/ref/Tags/findAll.adoc b/docs/src/main/docs/ref/Tags/findAll.adoc similarity index 100% rename from src/main/docs/ref/Tags/findAll.adoc rename to docs/src/main/docs/ref/Tags/findAll.adoc diff --git a/src/main/docs/ref/Tags/form.adoc b/docs/src/main/docs/ref/Tags/form.adoc similarity index 100% rename from src/main/docs/ref/Tags/form.adoc rename to docs/src/main/docs/ref/Tags/form.adoc diff --git a/src/main/docs/ref/Tags/formActionSubmit.adoc b/docs/src/main/docs/ref/Tags/formActionSubmit.adoc similarity index 100% rename from src/main/docs/ref/Tags/formActionSubmit.adoc rename to docs/src/main/docs/ref/Tags/formActionSubmit.adoc diff --git a/src/main/docs/ref/Tags/formatBoolean.adoc b/docs/src/main/docs/ref/Tags/formatBoolean.adoc similarity index 100% rename from src/main/docs/ref/Tags/formatBoolean.adoc rename to docs/src/main/docs/ref/Tags/formatBoolean.adoc diff --git a/src/main/docs/ref/Tags/formatDate.adoc b/docs/src/main/docs/ref/Tags/formatDate.adoc similarity index 100% rename from src/main/docs/ref/Tags/formatDate.adoc rename to docs/src/main/docs/ref/Tags/formatDate.adoc diff --git a/src/main/docs/ref/Tags/formatNumber.adoc b/docs/src/main/docs/ref/Tags/formatNumber.adoc similarity index 100% rename from src/main/docs/ref/Tags/formatNumber.adoc rename to docs/src/main/docs/ref/Tags/formatNumber.adoc diff --git a/src/main/docs/ref/Tags/grep.adoc b/docs/src/main/docs/ref/Tags/grep.adoc similarity index 100% rename from src/main/docs/ref/Tags/grep.adoc rename to docs/src/main/docs/ref/Tags/grep.adoc diff --git a/src/main/docs/ref/Tags/hasErrors.adoc b/docs/src/main/docs/ref/Tags/hasErrors.adoc similarity index 100% rename from src/main/docs/ref/Tags/hasErrors.adoc rename to docs/src/main/docs/ref/Tags/hasErrors.adoc diff --git a/src/main/docs/ref/Tags/header.adoc b/docs/src/main/docs/ref/Tags/header.adoc similarity index 100% rename from src/main/docs/ref/Tags/header.adoc rename to docs/src/main/docs/ref/Tags/header.adoc diff --git a/src/main/docs/ref/Tags/hiddenField.adoc b/docs/src/main/docs/ref/Tags/hiddenField.adoc similarity index 100% rename from src/main/docs/ref/Tags/hiddenField.adoc rename to docs/src/main/docs/ref/Tags/hiddenField.adoc diff --git a/src/main/docs/ref/Tags/if.adoc b/docs/src/main/docs/ref/Tags/if.adoc similarity index 100% rename from src/main/docs/ref/Tags/if.adoc rename to docs/src/main/docs/ref/Tags/if.adoc diff --git a/src/main/docs/ref/Tags/img.adoc b/docs/src/main/docs/ref/Tags/img.adoc similarity index 100% rename from src/main/docs/ref/Tags/img.adoc rename to docs/src/main/docs/ref/Tags/img.adoc diff --git a/src/main/docs/ref/Tags/include.adoc b/docs/src/main/docs/ref/Tags/include.adoc similarity index 100% rename from src/main/docs/ref/Tags/include.adoc rename to docs/src/main/docs/ref/Tags/include.adoc diff --git a/src/main/docs/ref/Tags/isAvailable.adoc b/docs/src/main/docs/ref/Tags/isAvailable.adoc similarity index 100% rename from src/main/docs/ref/Tags/isAvailable.adoc rename to docs/src/main/docs/ref/Tags/isAvailable.adoc diff --git a/src/main/docs/ref/Tags/isNotAvailable.adoc b/docs/src/main/docs/ref/Tags/isNotAvailable.adoc similarity index 100% rename from src/main/docs/ref/Tags/isNotAvailable.adoc rename to docs/src/main/docs/ref/Tags/isNotAvailable.adoc diff --git a/src/main/docs/ref/Tags/javascript.adoc b/docs/src/main/docs/ref/Tags/javascript.adoc similarity index 100% rename from src/main/docs/ref/Tags/javascript.adoc rename to docs/src/main/docs/ref/Tags/javascript.adoc diff --git a/src/main/docs/ref/Tags/join.adoc b/docs/src/main/docs/ref/Tags/join.adoc similarity index 100% rename from src/main/docs/ref/Tags/join.adoc rename to docs/src/main/docs/ref/Tags/join.adoc diff --git a/src/main/docs/ref/Tags/layoutBody.adoc b/docs/src/main/docs/ref/Tags/layoutBody.adoc similarity index 100% rename from src/main/docs/ref/Tags/layoutBody.adoc rename to docs/src/main/docs/ref/Tags/layoutBody.adoc diff --git a/src/main/docs/ref/Tags/layoutHead.adoc b/docs/src/main/docs/ref/Tags/layoutHead.adoc similarity index 100% rename from src/main/docs/ref/Tags/layoutHead.adoc rename to docs/src/main/docs/ref/Tags/layoutHead.adoc diff --git a/src/main/docs/ref/Tags/layoutTitle.adoc b/docs/src/main/docs/ref/Tags/layoutTitle.adoc similarity index 100% rename from src/main/docs/ref/Tags/layoutTitle.adoc rename to docs/src/main/docs/ref/Tags/layoutTitle.adoc diff --git a/src/main/docs/ref/Tags/link.adoc b/docs/src/main/docs/ref/Tags/link.adoc similarity index 100% rename from src/main/docs/ref/Tags/link.adoc rename to docs/src/main/docs/ref/Tags/link.adoc diff --git a/src/main/docs/ref/Tags/localeSelect.adoc b/docs/src/main/docs/ref/Tags/localeSelect.adoc similarity index 100% rename from src/main/docs/ref/Tags/localeSelect.adoc rename to docs/src/main/docs/ref/Tags/localeSelect.adoc diff --git a/src/main/docs/ref/Tags/message.adoc b/docs/src/main/docs/ref/Tags/message.adoc similarity index 100% rename from src/main/docs/ref/Tags/message.adoc rename to docs/src/main/docs/ref/Tags/message.adoc diff --git a/src/main/docs/ref/Tags/meta.adoc b/docs/src/main/docs/ref/Tags/meta.adoc similarity index 100% rename from src/main/docs/ref/Tags/meta.adoc rename to docs/src/main/docs/ref/Tags/meta.adoc diff --git a/src/main/docs/ref/Tags/pageProperty.adoc b/docs/src/main/docs/ref/Tags/pageProperty.adoc similarity index 100% rename from src/main/docs/ref/Tags/pageProperty.adoc rename to docs/src/main/docs/ref/Tags/pageProperty.adoc diff --git a/src/main/docs/ref/Tags/paginate.adoc b/docs/src/main/docs/ref/Tags/paginate.adoc similarity index 100% rename from src/main/docs/ref/Tags/paginate.adoc rename to docs/src/main/docs/ref/Tags/paginate.adoc diff --git a/src/main/docs/ref/Tags/passwordField.adoc b/docs/src/main/docs/ref/Tags/passwordField.adoc similarity index 100% rename from src/main/docs/ref/Tags/passwordField.adoc rename to docs/src/main/docs/ref/Tags/passwordField.adoc diff --git a/src/main/docs/ref/Tags/radio.adoc b/docs/src/main/docs/ref/Tags/radio.adoc similarity index 100% rename from src/main/docs/ref/Tags/radio.adoc rename to docs/src/main/docs/ref/Tags/radio.adoc diff --git a/src/main/docs/ref/Tags/radioGroup.adoc b/docs/src/main/docs/ref/Tags/radioGroup.adoc similarity index 100% rename from src/main/docs/ref/Tags/radioGroup.adoc rename to docs/src/main/docs/ref/Tags/radioGroup.adoc diff --git a/src/main/docs/ref/Tags/render.adoc b/docs/src/main/docs/ref/Tags/render.adoc similarity index 100% rename from src/main/docs/ref/Tags/render.adoc rename to docs/src/main/docs/ref/Tags/render.adoc diff --git a/src/main/docs/ref/Tags/renderErrors.adoc b/docs/src/main/docs/ref/Tags/renderErrors.adoc similarity index 100% rename from src/main/docs/ref/Tags/renderErrors.adoc rename to docs/src/main/docs/ref/Tags/renderErrors.adoc diff --git a/src/main/docs/ref/Tags/resource.adoc b/docs/src/main/docs/ref/Tags/resource.adoc similarity index 100% rename from src/main/docs/ref/Tags/resource.adoc rename to docs/src/main/docs/ref/Tags/resource.adoc diff --git a/src/main/docs/ref/Tags/select.adoc b/docs/src/main/docs/ref/Tags/select.adoc similarity index 100% rename from src/main/docs/ref/Tags/select.adoc rename to docs/src/main/docs/ref/Tags/select.adoc diff --git a/src/main/docs/ref/Tags/set.adoc b/docs/src/main/docs/ref/Tags/set.adoc similarity index 100% rename from src/main/docs/ref/Tags/set.adoc rename to docs/src/main/docs/ref/Tags/set.adoc diff --git a/src/main/docs/ref/Tags/sortableColumn.adoc b/docs/src/main/docs/ref/Tags/sortableColumn.adoc similarity index 100% rename from src/main/docs/ref/Tags/sortableColumn.adoc rename to docs/src/main/docs/ref/Tags/sortableColumn.adoc diff --git a/src/main/docs/ref/Tags/submitButton.adoc b/docs/src/main/docs/ref/Tags/submitButton.adoc similarity index 100% rename from src/main/docs/ref/Tags/submitButton.adoc rename to docs/src/main/docs/ref/Tags/submitButton.adoc diff --git a/src/main/docs/ref/Tags/textArea.adoc b/docs/src/main/docs/ref/Tags/textArea.adoc similarity index 100% rename from src/main/docs/ref/Tags/textArea.adoc rename to docs/src/main/docs/ref/Tags/textArea.adoc diff --git a/src/main/docs/ref/Tags/textField.adoc b/docs/src/main/docs/ref/Tags/textField.adoc similarity index 100% rename from src/main/docs/ref/Tags/textField.adoc rename to docs/src/main/docs/ref/Tags/textField.adoc diff --git a/src/main/docs/ref/Tags/timeZoneSelect.adoc b/docs/src/main/docs/ref/Tags/timeZoneSelect.adoc similarity index 100% rename from src/main/docs/ref/Tags/timeZoneSelect.adoc rename to docs/src/main/docs/ref/Tags/timeZoneSelect.adoc diff --git a/src/main/docs/ref/Tags/unless.adoc b/docs/src/main/docs/ref/Tags/unless.adoc similarity index 100% rename from src/main/docs/ref/Tags/unless.adoc rename to docs/src/main/docs/ref/Tags/unless.adoc diff --git a/src/main/docs/ref/Tags/uploadForm.adoc b/docs/src/main/docs/ref/Tags/uploadForm.adoc similarity index 100% rename from src/main/docs/ref/Tags/uploadForm.adoc rename to docs/src/main/docs/ref/Tags/uploadForm.adoc diff --git a/src/main/docs/ref/Tags/while.adoc b/docs/src/main/docs/ref/Tags/while.adoc similarity index 100% rename from src/main/docs/ref/Tags/while.adoc rename to docs/src/main/docs/ref/Tags/while.adoc diff --git a/src/main/docs/resources/style/layout.html b/docs/src/main/docs/resources/style/layout.html similarity index 99% rename from src/main/docs/resources/style/layout.html rename to docs/src/main/docs/resources/style/layout.html index 724c01a4cd..5e0b24b153 100644 --- a/src/main/docs/resources/style/layout.html +++ b/docs/src/main/docs/resources/style/layout.html @@ -61,7 +61,6 @@
-

${title.encodeAsHtml()}

diff --git a/examples/sitemesh3/README.md b/examples/sitemesh3/README.md new file mode 100644 index 0000000000..33e0e0d958 --- /dev/null +++ b/examples/sitemesh3/README.md @@ -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``` diff --git a/examples/sitemesh3/build.gradle b/examples/sitemesh3/build.gradle new file mode 100644 index 0000000000..997013c703 --- /dev/null +++ b/examples/sitemesh3/build.gradle @@ -0,0 +1,78 @@ +buildscript { + repositories { + maven { url "https://repo.grails.org/grails/core" } + } + dependencies { + classpath platform("org.grails:grails-bom:$grailsVersion") + classpath "org.grails:grails-gradle-plugin" + } +} + +plugins { + id "war" + id "com.bertramlabs.asset-pipeline" version "5.0.5" +} + +apply plugin:"org.grails.grails-web" +apply plugin:"org.grails.grails-gsp" +apply plugin:"org.grails.grails-plugin" + +version '0.0.1' +group 'org.sitemesh.grails.plugins.sitemesh3' + +apply plugin:"org.grails.grails-web" +apply plugin:"org.grails.grails-gsp" + +dependencies { +// for testing purposes +// implementation files('lib/sitemesh-3.1.0-SNAPSHOT.jar', 'lib/spring-boot-starter-sitemesh-3.1.0-SNAPSHOT-plain.jar') + console "org.grails:grails-console" + + implementation "org.grails:grails-plugin-databinding" + implementation "org.grails:grails-plugin-i18n" + implementation "org.grails:grails-plugin-interceptors" + implementation "org.grails:grails-plugin-rest" + implementation "org.grails:grails-plugin-services" + implementation "org.grails:grails-plugin-url-mappings" + implementation "org.grails:grails-web-boot" + implementation project(':grails-plugin-gsp') + implementation project(':grails-plugin-sitemesh3') + + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails" + runtimeOnly "com.h2database:h2" + runtimeOnly "org.apache.tomcat:tomcat-jdbc" + runtimeOnly "org.fusesource.jansi:jansi" + runtimeOnly "org.grails.plugins:hibernate5" + runtimeOnly "org.grails.plugins:scaffolding" + runtimeOnly "org.grails:grails-core" + runtimeOnly "org.grails:grails-logging" + runtimeOnly "org.springframework.boot:spring-boot-autoconfigure" + runtimeOnly "org.springframework.boot:spring-boot-starter-actuator" + runtimeOnly "org.springframework.boot:spring-boot-starter-logging" + runtimeOnly "org.springframework.boot:spring-boot-starter-tomcat" + runtimeOnly "org.springframework.boot:spring-boot-starter-validation" + + runtimeOnly "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:$jstlVersion" + runtimeOnly "org.glassfish.web:jakarta.servlet.jsp.jstl:$jstlVersion" + runtimeOnly 'org.apache.tomcat.embed:tomcat-embed-jasper:10.1.0' // jsp example + + testImplementation 'org.grails:grails-gorm-testing-support' + testImplementation 'org.grails:grails-web-testing-support' + testImplementation 'org.spockframework:spock-core' + integrationTestImplementation testFixtures ("org.grails.plugins:geb") +} + +tasks.withType(Test) { + useJUnitPlatform() +} + +assets { + minifyJs = true + minifyCss = true + packagePlugin = true +} + +bootRun { + String springProfilesActive = 'spring.profiles.active' + systemProperty springProfilesActive, System.getProperty(springProfilesActive) +} \ No newline at end of file diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/advancedgrails.svg b/examples/sitemesh3/grails-app/assets/images/advancedgrails.svg similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/advancedgrails.svg rename to examples/sitemesh3/grails-app/assets/images/advancedgrails.svg diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/apple-touch-icon-retina.png b/examples/sitemesh3/grails-app/assets/images/apple-touch-icon-retina.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/apple-touch-icon-retina.png rename to examples/sitemesh3/grails-app/assets/images/apple-touch-icon-retina.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/apple-touch-icon.png b/examples/sitemesh3/grails-app/assets/images/apple-touch-icon.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/apple-touch-icon.png rename to examples/sitemesh3/grails-app/assets/images/apple-touch-icon.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/documentation.svg b/examples/sitemesh3/grails-app/assets/images/documentation.svg similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/documentation.svg rename to examples/sitemesh3/grails-app/assets/images/documentation.svg diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/favicon.ico b/examples/sitemesh3/grails-app/assets/images/favicon.ico similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/favicon.ico rename to examples/sitemesh3/grails-app/assets/images/favicon.ico diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/grails-cupsonly-logo-white.svg b/examples/sitemesh3/grails-app/assets/images/grails-cupsonly-logo-white.svg similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/grails-cupsonly-logo-white.svg rename to examples/sitemesh3/grails-app/assets/images/grails-cupsonly-logo-white.svg diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/grails.svg b/examples/sitemesh3/grails-app/assets/images/grails.svg similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/grails.svg rename to examples/sitemesh3/grails-app/assets/images/grails.svg diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/database_add.png b/examples/sitemesh3/grails-app/assets/images/skin/database_add.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/database_add.png rename to examples/sitemesh3/grails-app/assets/images/skin/database_add.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/database_delete.png b/examples/sitemesh3/grails-app/assets/images/skin/database_delete.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/database_delete.png rename to examples/sitemesh3/grails-app/assets/images/skin/database_delete.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/database_edit.png b/examples/sitemesh3/grails-app/assets/images/skin/database_edit.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/database_edit.png rename to examples/sitemesh3/grails-app/assets/images/skin/database_edit.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/database_save.png b/examples/sitemesh3/grails-app/assets/images/skin/database_save.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/database_save.png rename to examples/sitemesh3/grails-app/assets/images/skin/database_save.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/database_table.png b/examples/sitemesh3/grails-app/assets/images/skin/database_table.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/database_table.png rename to examples/sitemesh3/grails-app/assets/images/skin/database_table.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/exclamation.png b/examples/sitemesh3/grails-app/assets/images/skin/exclamation.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/exclamation.png rename to examples/sitemesh3/grails-app/assets/images/skin/exclamation.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/house.png b/examples/sitemesh3/grails-app/assets/images/skin/house.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/house.png rename to examples/sitemesh3/grails-app/assets/images/skin/house.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/information.png b/examples/sitemesh3/grails-app/assets/images/skin/information.png similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/information.png rename to examples/sitemesh3/grails-app/assets/images/skin/information.png diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/sorted_asc.gif b/examples/sitemesh3/grails-app/assets/images/skin/sorted_asc.gif similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/sorted_asc.gif rename to examples/sitemesh3/grails-app/assets/images/skin/sorted_asc.gif diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/skin/sorted_desc.gif b/examples/sitemesh3/grails-app/assets/images/skin/sorted_desc.gif similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/skin/sorted_desc.gif rename to examples/sitemesh3/grails-app/assets/images/skin/sorted_desc.gif diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/slack.svg b/examples/sitemesh3/grails-app/assets/images/slack.svg similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/slack.svg rename to examples/sitemesh3/grails-app/assets/images/slack.svg diff --git a/grails-plugin-sitemesh3/grails-app/assets/images/spinner.gif b/examples/sitemesh3/grails-app/assets/images/spinner.gif similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/images/spinner.gif rename to examples/sitemesh3/grails-app/assets/images/spinner.gif diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/application.js b/examples/sitemesh3/grails-app/assets/javascripts/application.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/application.js rename to examples/sitemesh3/grails-app/assets/javascripts/application.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js.map b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js.map rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.js.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js.map b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js.map rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.bundle.min.js.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.js b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.js rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.js.map b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.js.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.js.map rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.js.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.min.js b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.min.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.min.js rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.min.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.min.js.map b/examples/sitemesh3/grails-app/assets/javascripts/bootstrap.min.js.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/bootstrap.min.js.map rename to examples/sitemesh3/grails-app/assets/javascripts/bootstrap.min.js.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.js b/examples/sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.js rename to examples/sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js b/examples/sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js rename to examples/sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js.map b/examples/sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js.map rename to examples/sitemesh3/grails-app/assets/javascripts/jquery-3.5.1.min.js.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/popper.js b/examples/sitemesh3/grails-app/assets/javascripts/popper.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/popper.js rename to examples/sitemesh3/grails-app/assets/javascripts/popper.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/popper.min.js b/examples/sitemesh3/grails-app/assets/javascripts/popper.min.js similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/popper.min.js rename to examples/sitemesh3/grails-app/assets/javascripts/popper.min.js diff --git a/grails-plugin-sitemesh3/grails-app/assets/javascripts/popper.min.js.map b/examples/sitemesh3/grails-app/assets/javascripts/popper.min.js.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/javascripts/popper.min.js.map rename to examples/sitemesh3/grails-app/assets/javascripts/popper.min.js.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/application.css b/examples/sitemesh3/grails-app/assets/stylesheets/application.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/application.css rename to examples/sitemesh3/grails-app/assets/stylesheets/application.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css.map b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css.map rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.css.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css.map b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css.map rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-grid.min.css.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-reboot.css b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-reboot.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap-reboot.css rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap-reboot.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.css b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.css rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.css.map b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.css.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.css.map rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.css.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css.map b/examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css.map similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css.map rename to examples/sitemesh3/grails-app/assets/stylesheets/bootstrap.min.css.map diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/errors.css b/examples/sitemesh3/grails-app/assets/stylesheets/errors.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/errors.css rename to examples/sitemesh3/grails-app/assets/stylesheets/errors.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/grails.css b/examples/sitemesh3/grails-app/assets/stylesheets/grails.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/grails.css rename to examples/sitemesh3/grails-app/assets/stylesheets/grails.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/main.css b/examples/sitemesh3/grails-app/assets/stylesheets/main.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/main.css rename to examples/sitemesh3/grails-app/assets/stylesheets/main.css diff --git a/grails-plugin-sitemesh3/grails-app/assets/stylesheets/mobile.css b/examples/sitemesh3/grails-app/assets/stylesheets/mobile.css similarity index 100% rename from grails-plugin-sitemesh3/grails-app/assets/stylesheets/mobile.css rename to examples/sitemesh3/grails-app/assets/stylesheets/mobile.css diff --git a/grails-plugin-sitemesh3/grails-app/conf/application.yml b/examples/sitemesh3/grails-app/conf/application.yml similarity index 100% rename from grails-plugin-sitemesh3/grails-app/conf/application.yml rename to examples/sitemesh3/grails-app/conf/application.yml diff --git a/grails-plugin-sitemesh3/grails-app/conf/logback-spring.xml b/examples/sitemesh3/grails-app/conf/logback-spring.xml similarity index 100% rename from grails-plugin-sitemesh3/grails-app/conf/logback-spring.xml rename to examples/sitemesh3/grails-app/conf/logback-spring.xml diff --git a/grails-plugin-sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/DemoController.groovy b/examples/sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/DemoController.groovy similarity index 100% rename from grails-plugin-sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/DemoController.groovy rename to examples/sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/DemoController.groovy diff --git a/grails-plugin-sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/UrlMappings.groovy b/examples/sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/UrlMappings.groovy similarity index 100% rename from grails-plugin-sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/UrlMappings.groovy rename to examples/sitemesh3/grails-app/controllers/org/sitemesh/grails/plugins/sitemesh3/UrlMappings.groovy diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages.properties b/examples/sitemesh3/grails-app/i18n/messages.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages.properties rename to examples/sitemesh3/grails-app/i18n/messages.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_cs.properties b/examples/sitemesh3/grails-app/i18n/messages_cs.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_cs.properties rename to examples/sitemesh3/grails-app/i18n/messages_cs.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_da.properties b/examples/sitemesh3/grails-app/i18n/messages_da.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_da.properties rename to examples/sitemesh3/grails-app/i18n/messages_da.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_de.properties b/examples/sitemesh3/grails-app/i18n/messages_de.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_de.properties rename to examples/sitemesh3/grails-app/i18n/messages_de.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_es.properties b/examples/sitemesh3/grails-app/i18n/messages_es.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_es.properties rename to examples/sitemesh3/grails-app/i18n/messages_es.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_fr.properties b/examples/sitemesh3/grails-app/i18n/messages_fr.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_fr.properties rename to examples/sitemesh3/grails-app/i18n/messages_fr.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_it.properties b/examples/sitemesh3/grails-app/i18n/messages_it.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_it.properties rename to examples/sitemesh3/grails-app/i18n/messages_it.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_ja.properties b/examples/sitemesh3/grails-app/i18n/messages_ja.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_ja.properties rename to examples/sitemesh3/grails-app/i18n/messages_ja.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_nb.properties b/examples/sitemesh3/grails-app/i18n/messages_nb.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_nb.properties rename to examples/sitemesh3/grails-app/i18n/messages_nb.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_nl.properties b/examples/sitemesh3/grails-app/i18n/messages_nl.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_nl.properties rename to examples/sitemesh3/grails-app/i18n/messages_nl.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_pl.properties b/examples/sitemesh3/grails-app/i18n/messages_pl.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_pl.properties rename to examples/sitemesh3/grails-app/i18n/messages_pl.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_pt_BR.properties b/examples/sitemesh3/grails-app/i18n/messages_pt_BR.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_pt_BR.properties rename to examples/sitemesh3/grails-app/i18n/messages_pt_BR.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_pt_PT.properties b/examples/sitemesh3/grails-app/i18n/messages_pt_PT.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_pt_PT.properties rename to examples/sitemesh3/grails-app/i18n/messages_pt_PT.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_ru.properties b/examples/sitemesh3/grails-app/i18n/messages_ru.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_ru.properties rename to examples/sitemesh3/grails-app/i18n/messages_ru.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_sk.properties b/examples/sitemesh3/grails-app/i18n/messages_sk.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_sk.properties rename to examples/sitemesh3/grails-app/i18n/messages_sk.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_sv.properties b/examples/sitemesh3/grails-app/i18n/messages_sv.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_sv.properties rename to examples/sitemesh3/grails-app/i18n/messages_sv.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_th.properties b/examples/sitemesh3/grails-app/i18n/messages_th.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_th.properties rename to examples/sitemesh3/grails-app/i18n/messages_th.properties diff --git a/grails-plugin-sitemesh3/grails-app/i18n/messages_zh_CN.properties b/examples/sitemesh3/grails-app/i18n/messages_zh_CN.properties similarity index 100% rename from grails-plugin-sitemesh3/grails-app/i18n/messages_zh_CN.properties rename to examples/sitemesh3/grails-app/i18n/messages_zh_CN.properties diff --git a/grails-plugin-sitemesh3/grails-app/init/org/sitemesh/grails/plugins/sitemesh3/Application.groovy b/examples/sitemesh3/grails-app/init/org/sitemesh/grails/plugins/sitemesh3/Application.groovy similarity index 100% rename from grails-plugin-sitemesh3/grails-app/init/org/sitemesh/grails/plugins/sitemesh3/Application.groovy rename to examples/sitemesh3/grails-app/init/org/sitemesh/grails/plugins/sitemesh3/Application.groovy diff --git a/grails-plugin-sitemesh3/grails-app/views/demo/chaining.gsp b/examples/sitemesh3/grails-app/views/demo/chaining.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/demo/chaining.gsp rename to examples/sitemesh3/grails-app/views/demo/chaining.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/demo/index.gsp b/examples/sitemesh3/grails-app/views/demo/index.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/demo/index.gsp rename to examples/sitemesh3/grails-app/views/demo/index.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/demo/viewException.gsp b/examples/sitemesh3/grails-app/views/demo/viewException.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/demo/viewException.gsp rename to examples/sitemesh3/grails-app/views/demo/viewException.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/error.gsp b/examples/sitemesh3/grails-app/views/error.gsp similarity index 67% rename from grails-plugin-sitemesh3/grails-app/views/error.gsp rename to examples/sitemesh3/grails-app/views/error.gsp index a2c4235abc..bd374a3869 100644 --- a/grails-plugin-sitemesh3/grails-app/views/error.gsp +++ b/examples/sitemesh3/grails-app/views/error.gsp @@ -23,9 +23,17 @@ -
    -
  • An error has occurred
  • -
+ + ${(exception as Throwable).message} + + + ${(request.getAttribute('jakarta.servlet.error.exception') as Throwable).message} + + +
    +
  • An error has occurred
  • +
+
diff --git a/grails-plugin-sitemesh3/grails-app/views/index.gsp b/examples/sitemesh3/grails-app/views/index.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/index.gsp rename to examples/sitemesh3/grails-app/views/index.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/layouts/bootstrap5.gsp b/examples/sitemesh3/grails-app/views/layouts/bootstrap5.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/layouts/bootstrap5.gsp rename to examples/sitemesh3/grails-app/views/layouts/bootstrap5.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/layouts/main.gsp b/examples/sitemesh3/grails-app/views/layouts/main.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/layouts/main.gsp rename to examples/sitemesh3/grails-app/views/layouts/main.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/layouts/modal.gsp b/examples/sitemesh3/grails-app/views/layouts/modal.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/layouts/modal.gsp rename to examples/sitemesh3/grails-app/views/layouts/modal.gsp diff --git a/grails-plugin-sitemesh3/grails-app/views/notFound.gsp b/examples/sitemesh3/grails-app/views/notFound.gsp similarity index 100% rename from grails-plugin-sitemesh3/grails-app/views/notFound.gsp rename to examples/sitemesh3/grails-app/views/notFound.gsp diff --git a/grails-plugin-sitemesh3/grails-cli.yml b/examples/sitemesh3/grails-cli.yml similarity index 100% rename from grails-plugin-sitemesh3/grails-cli.yml rename to examples/sitemesh3/grails-cli.yml diff --git a/examples/sitemesh3/src/integration-test/groovy/SitemeshSpec.groovy b/examples/sitemesh3/src/integration-test/groovy/SitemeshSpec.groovy new file mode 100644 index 0000000000..9a3c1103ad --- /dev/null +++ b/examples/sitemesh3/src/integration-test/groovy/SitemeshSpec.groovy @@ -0,0 +1,68 @@ + +import grails.plugin.geb.ContainerGebConfiguration +import grails.plugin.geb.ContainerGebSpec +import grails.testing.mixin.integration.Integration + +@Integration +@ContainerGebConfiguration +class SitemeshSpec extends ContainerGebSpec { + + void "forced layout"() { + when: + browser.go 'demo/index' + + then: + browser.driver.pageSource.contains('''Do you like BootStrap?''') + } + + void "decorator chaining"() { + when: + browser.go 'demo/chaining' + + then: + browser.driver.pageSource.contains('''This is so cool.''') + } + + void "jsp demo"() { + when: + browser.go 'demo/jsp' + + then: + def container = $('div.container') + container + + browser.driver.pageSource.contains('''Hello World, I am a JSP page!''') + } + + void "text"() { + when: + browser.go 'demo/renderText' + + then: + downloadText() == '''

Hello World

''' + } + + void "Controller 500 Example"() { + when: + browser.go 'demo/exception' + + then: + browser.driver.pageSource.contains('Whoops, why would you ever want to see an exception??') + } + + void "View 500 Example"() { + when: + browser.go 'demo/viewException' + + then: + browser.driver.pageSource.contains('Oh Man, this view sucks!') + } + + void "404 Error"() { + when: + browser.go 'demo/404' + + then: + browser.driver.pageSource.contains('Error: Page Not Found (404)') + } +} diff --git a/grails-plugin-sitemesh3/src/main/webapp/WEB-INF/grails-app/views/demo/hello.jsp b/examples/sitemesh3/src/main/webapp/WEB-INF/grails-app/views/demo/hello.jsp similarity index 100% rename from grails-plugin-sitemesh3/src/main/webapp/WEB-INF/grails-app/views/demo/hello.jsp rename to examples/sitemesh3/src/main/webapp/WEB-INF/grails-app/views/demo/hello.jsp diff --git a/gradle.properties b/gradle.properties index 1166fcf4e2..b1a8704fcf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,27 +1,19 @@ -title=Groovy Server Pages (GSP) -authors=Puneet Behl -projectVersion=7.0.0-M1 -projectDesc=GSP (Groovy Server Pages) - A server-side view rendering technology based on Groovy -projectUrl=https://github.com/grails/grails-gsp -githubSlug=grails/grails-gsp -githubBranch=7.0.x -developers=Puneet Behl, Graeme Rocher +projectVersion=7.0.0-SNAPSHOT + +# for docs +githubBranch = 7.0.x commonsTextVersion=1.13.0 elApiVersion=6.0.1 -grailsGradlePluginVersion=7.0.0-SNAPSHOT -grailsVersion=7.0.0-M1 +grailsVersion=7.0.0-SNAPSHOT groovyVersion=4.0.24 jspApiVersion=4.0.0 jstlVersion=3.0.1 -servletApiVersion=6.0.0 -sitemeshVersion=7.0.0-M1 -controllersRef=https://docs.grails.org/latest/ref/Controllers -commandLineRef=https://docs.grails.org/latest/ref/Command%20Line -grailsDocsVersion=7.0.0-SNAPSHOT -testingSupportVersion=4.0.0-SNAPSHOT -junit-jupiter.version=5.8.0 +sitemeshLibraryVersion=3.2.2 + +slf4jPreventExclusion=true org.gradle.caching=true org.gradle.parallel=true org.gradle.daemon=true +org.gradle.jvmArgs=-Dfile.encoding=UTF-8 -Xmx1024M diff --git a/gradle/aggregate-groovydoc.gradle b/gradle/aggregate-groovydoc.gradle new file mode 100644 index 0000000000..837d446c91 --- /dev/null +++ b/gradle/aggregate-groovydoc.gradle @@ -0,0 +1,30 @@ + +tasks.register('cleanDocs', Delete) { + delete rootProject.layout.buildDirectory.dir('docs') +} + +tasks.register('aggregateGroovydoc', Groovydoc) { + def groovyDocProjects = rootProject.subprojects.findAll { it.name != 'docs' && !it.name.startsWith('examples') }.findAll { it.file('src/main/groovy').exists() } + dependsOn = [tasks.named('cleanDocs')] + groovyDocProjects.collect { it.tasks.named('groovydoc') } + + docTitle = "Groovy Server Pages (GSP) - ${project.name} - ${project.version}" + group = JavaBasePlugin.DOCUMENTATION_GROUP + description = 'Copies Groovy API Documentation for all supporting projects' + destinationDir = project.layout.buildDirectory.dir('docs/api').get().asFile + source = files(groovyDocProjects.collect { Project project -> project.files("src/main/groovy") }) + classpath = files(groovyDocProjects.collect { Project project -> project.configurations.compileClasspath }) +} + +tasks.register('docs') { + group = JavaBasePlugin.DOCUMENTATION_GROUP + dependsOn = ['aggregateGroovydoc', 'docs:publishGuide'] + finalizedBy 'copyGuide' +} + +tasks.register('copyGuide', Copy) { + group = JavaBasePlugin.DOCUMENTATION_GROUP + from "${rootProject.allprojects.find { it.name == 'docs'}.projectDir}/build/docs" + includes = ['**'] + into rootProject.layout.buildDirectory.dir('docs') + includeEmptyDirs = false +} diff --git a/gradle/java-config.gradle b/gradle/java-config.gradle new file mode 100644 index 0000000000..ab5e0a963d --- /dev/null +++ b/gradle/java-config.gradle @@ -0,0 +1,16 @@ +apply plugin: 'idea' +apply plugin: 'java-library' + +compileJava.options.release = 17 + +java { + withSourcesJar() + withJavadocJar() +} + +dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") + api "org.apache.groovy:groovy:$groovyVersion" + compileOnly "jakarta.servlet:jakarta.servlet-api" + compileOnly "jakarta.persistence:jakarta.persistence-api" +} \ No newline at end of file diff --git a/gradle/publish.gradle b/gradle/publish.gradle new file mode 100644 index 0000000000..a783e55b51 --- /dev/null +++ b/gradle/publish.gradle @@ -0,0 +1,93 @@ +apply plugin: 'maven-publish' +apply plugin: 'signing' + +publishing { + if (isSnapshot) { + repositories { + maven { + credentials { + def u = System.getenv('ARTIFACTORY_USERNAME') ?: project.findProperty('artifactoryPublishUsername') ?: '' + def p = System.getenv('ARTIFACTORY_PASSWORD') ?: project.findProperty('artifactoryPublishPassword') ?: '' + username = u + password = p + } + if (project.group == 'org.grails.plugins') { + url "https://repo.grails.org/grails/plugins3-snapshots-local" + } else { + url "https://repo.grails.org/grails/libs-snapshots-local" + } + } + } + } + + publications { + maven(MavenPublication) { + artifactId = project.name + groupId = project.group + version = project.version + + from components.java + + artifact sourcesJar + artifact javadocJar + + if (project.group == 'org.grails.plugins') { + artifact source: project.layout.buildDirectory.dir("classes/groovy/main/META-INF/grails-plugin.xml"), + classifier: "plugin", + extension: 'xml' + } + + pom.withXml { + def pomNode = asNode() + + // dependency management shouldn't be included + try { pomNode.dependencyManagement.replaceNode({}) } catch (Throwable ignore) {} + + name = project.findProperty('title') ?: 'Groovy Server Pages (GSP)' + description = project.findProperty('projectDesc') ?: 'Groovy Server Pages (GSP) - A server-side view rendering technology based on Groovy' + url = projectUrl + + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } + } + + developers { + for (dev in developers ?: [id: 'graemerocher', name: 'Graeme Rocher']) { + developer { + id dev.id + name dev.name + } + } + } + + scm { + url "scm:git@github.com:${project.githubSlug}.git" + connection "scm:git@github.com:${project.githubSlug}.git" + developerConnection "scm:git@github.com:${project.githubSlug}.git" + } + } + } + } +} + + +afterEvaluate { + signing { + ext['signing.keyId'] = project.findProperty('signing.keyId') ?: System.getenv('SIGNING_KEY') + ext['signing.password'] = project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE') + ext['signing.secretKeyRingFile'] = project.findProperty('signing.secretKeyRingFile') ?: "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg" + + required { + isReleaseVersion && gradle.taskGraph.hasTask('publish') + } + sign publishing.publications.maven + } +} + +tasks.withType(Sign) { + onlyIf { isReleaseVersion } +} \ No newline at end of file diff --git a/gradle/test.gradle b/gradle/test.gradle new file mode 100644 index 0000000000..ef458f2a61 --- /dev/null +++ b/gradle/test.gradle @@ -0,0 +1,40 @@ +dependencies { + testImplementation "jakarta.servlet:jakarta.servlet-api" + testImplementation "org.apache.groovy:groovy-test-junit5:$groovyVersion" + testImplementation "org.junit.jupiter:junit-jupiter-api" + testImplementation "org.junit.platform:junit-platform-runner" + testImplementation "org.spockframework:spock-core" + testImplementation "org.springframework:spring-test" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" +} + +test { + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + } +} + +tasks.withType(Test) { + useJUnitPlatform() + testLogging { + showStandardStreams = true + exceptionFormat = 'full' + } + + if (isCiBuild) { + maxParallelForks = project.findProperty('testMaxParallelFork') ?: 2 + forkEvery = project.findProperty('testForkEvery') ?: 0 + } else { + maxParallelForks = project.findProperty('testMaxParallelFork') ?: 4 + forkEvery = project.findProperty('testForkEvery') ?: 0 + } + + if(project.findProperty('testJvmArgs')) { + jvmArgs = project.findProperty('testJvmArgs') + } + + afterSuite { + System.out.print('.') + System.out.flush() + } +} \ No newline at end of file diff --git a/grails-gsp/README.md b/grails-gsp/README.md index 728b30cd1a..954e1701be 100644 --- a/grails-gsp/README.md +++ b/grails-gsp/README.md @@ -1,12 +1,12 @@ ## Grails GSP -This subproject is required for all Grails 3 applications and plugins that require GSP processing. If your project includes GSPs you should add the following to your `build.gradle` which is provided by the [Grails Gradle Plugin](https://github.com/grails/grails-core/tree/master/grails-gradle-plugin). +This subproject is required for all Grails applications and plugins that require GSP processing. If your project includes GSPs you should add the following to your `build.gradle` which is provided by the [Grails Gradle Plugin](https://github.com/grails/grails-core/tree/master/grails-gradle-plugin). ``` gradle apply plugin: "org.grails.grails-gsp" ``` -It is typical of standard Grails 3 application to use this in conjunction with `grails-web` as in the following example: +It is typical of standard Grails application to use this in conjunction with `grails-web` as in the following example: ``` gradle apply plugin: "org.grails.grails-web" diff --git a/grails-gsp/build.gradle b/grails-gsp/build.gradle index 4feeb6b6c7..1f23069856 100644 --- a/grails-gsp/build.gradle +++ b/grails-gsp/build.gradle @@ -1,5 +1,13 @@ +version project.projectVersion +group "org.grails" + +apply from: rootProject.file('gradle/java-config.gradle') + dependencies { - api "org.grails:grails-core:$grailsVersion" + api "org.grails:grails-core" api project(":grails-taglib") api "org.apache.groovy:groovy-templates:$groovyVersion" } + +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') \ No newline at end of file diff --git a/grails-plugin-gsp/build.gradle b/grails-plugin-gsp/build.gradle index 4af23abcf3..849b0e0c4c 100644 --- a/grails-plugin-gsp/build.gradle +++ b/grails-plugin-gsp/build.gradle @@ -1,6 +1,27 @@ +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 project.projectVersion +group "org.grails.plugins" + +apply plugin: "org.grails.grails-plugin" + +apply from: rootProject.file('gradle/java-config.gradle') + ext { - isCiBuild = System.getenv().get("TRAVIS") == 'true' || System.getenv().get("CI") as Boolean + testMaxParallelFork = isCiBuild ? 1 : 4 + testForkEvery = isCiBuild ? 10 : 20 + testJvmArgs = ['-Xmx1536M'] } + +// Fixes JSP tests configurations.all { resolutionStrategy.dependencySubstitution.all { DependencySubstitution dependency -> if (dependency.requested instanceof ModuleComponentSelector) { @@ -13,42 +34,28 @@ configurations.all { } } } + dependencies { - compileOnly "jakarta.servlet:jakarta.servlet-api" api project(":grails-web-gsp-taglib") - api "org.sitemesh:grails-plugin-sitemesh3:$sitemeshVersion" + api project(":grails-plugin-sitemesh3") runtimeOnly(project(":grails-web-jsp")) api "org.apache.commons:commons-text:$commonsTextVersion" - api "org.grails:grails-plugin-codecs:$grailsVersion" + api "org.grails:grails-plugin-codecs" astImplementation "org.grails:grails-web" astImplementation "org.grails:grails-plugin-controllers" - testImplementation "org.grails:grails-web-testing-support" - testImplementation "org.grails:grails-testing-support" + testImplementation "jakarta.annotation:jakarta.annotation-api" + testImplementation "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:$jstlVersion" + testImplementation "jakarta.servlet.jsp:jakarta.servlet.jsp-api:$jspApiVersion" testImplementation "org.grails:grails-gorm-testing-support" + testImplementation "org.grails:grails-testing-support" + testImplementation "org.grails:grails-web-testing-support" + testRuntimeOnly "org.glassfish.web:jakarta.servlet.jsp.jstl:$jstlVersion" testRuntimeOnly "org.grails.plugins:async" - testImplementation "jakarta.annotation:jakarta.annotation-api" - testImplementation "jakarta.servlet.jsp:jakarta.servlet.jsp-api:${jspApiVersion}" - testRuntimeOnly "org.glassfish.web:jakarta.servlet.jsp.jstl:${jstlVersion}" - testImplementation "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:${jstlVersion}" - testRuntimeOnly "org.grails:grails-plugin-url-mappings" } -test { - if (isCiBuild) { - maxParallelForks = 1 - forkEvery = 10 - } - else { - maxParallelForks = 4 - forkEvery = 20 - } - jvmArgs = ['-Xmx1536M'] - afterSuite { - System.out.print('.') - System.out.flush() - } -} +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesGrailsPlugin.groovy b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesGrailsPlugin.groovy index 1d2c1b4c6c..7c8264064a 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesGrailsPlugin.groovy +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesGrailsPlugin.groovy @@ -48,6 +48,7 @@ import org.springframework.boot.web.servlet.ServletRegistrationBean import org.springframework.core.io.Resource import org.springframework.util.ClassUtils import org.springframework.web.servlet.view.InternalResourceViewResolver + /** * Sets up and configures the GSP and GSP tag library support in Grails. * @@ -63,7 +64,7 @@ class GroovyPagesGrailsPlugin extends Plugin { def watchedResources = ["file:./plugins/*/grails-app/taglib/**/*TagLib.groovy", "file:./grails-app/taglib/**/*TagLib.groovy"] - def grailsVersion = "6.0.0 > *" + def grailsVersion = "7.0.0-SNAPSHOT > *" def dependsOn = [core: GrailsUtil.getGrailsVersion(), i18n: GrailsUtil.getGrailsVersion()] def observe = ['controllers'] def loadAfter = ['filters'] diff --git a/grails-plugin-sitemesh3/.github/workflows/gradle.yml b/grails-plugin-sitemesh3/.github/workflows/gradle.yml deleted file mode 100644 index dfb7d14165..0000000000 --- a/grails-plugin-sitemesh3/.github/workflows/gradle.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build and Publish SiteMesh 3 Grails Plugin - -on: - push: - -jobs: - build-gradle-project: - runs-on: ubuntu-latest - steps: - - name: Checkout project sources - uses: actions/checkout@v3 - - name: Set up JDK 17 with cache - uses: actions/setup-java@v3 - with: - distribution: 'liberica' - java-version: '17' - cache: 'gradle' - - name: Run build with Gradle Wrapper - env: - MAVEN_PUBLISH_USERNAME: ${{ secrets.GITHUB_ACTOR }} - MAVEN_PUBLISH_PASSWORD: ${{ secrets.GH_TOKEN }} - SIGNING_KEY: ${{ secrets.SIGNING_KEY }} - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - run: ./gradlew test publish \ No newline at end of file diff --git a/grails-plugin-sitemesh3/.gitignore b/grails-plugin-sitemesh3/.gitignore deleted file mode 100644 index c5f0be6054..0000000000 --- a/grails-plugin-sitemesh3/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -Thumbs.db -.DS_Store -.gradle -build/ -target/ -out/ -.idea -*.iml -*.ipr -*.iws -.project -.settings -.classpath -.factorypath diff --git a/grails-plugin-sitemesh3/.sdkmanrc b/grails-plugin-sitemesh3/.sdkmanrc deleted file mode 100644 index 215786fc3c..0000000000 --- a/grails-plugin-sitemesh3/.sdkmanrc +++ /dev/null @@ -1 +0,0 @@ -java=17.0.12-librca diff --git a/grails-plugin-sitemesh3/LICENSE b/grails-plugin-sitemesh3/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/grails-plugin-sitemesh3/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/grails-plugin-sitemesh3/README.md b/grails-plugin-sitemesh3/README.md index 7319411ee0..4e36c99785 100644 --- a/grails-plugin-sitemesh3/README.md +++ b/grails-plugin-sitemesh3/README.md @@ -1,46 +1,2 @@ # SiteMesh 3 Grails Plugin -SiteMesh 3 Grails Plugin demonstrating how to use [SiteMesh 3](https://github.com/sitemesh/sitemesh3) instead of [SiteMesh 2](https://github.com/sitemesh/sitemesh2) - - [See discussion here](https://github.com/grails/grails-core/issues/13058) - -## 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``` - - -# Grails 6 Installation instructions: - -### Step 1 - Install the plugin - -Modify `build.gradle` to use the plugin -```groovy -repositories { - // ... - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } -} - -dependencies { - implementation("org.sitemesh:grails-plugin-sitemesh3:7.0.0-SNAPSHOT") - // ... existing dependencies -} -``` - -`oss snapshots` is needed until the plugin are officially released. - -### Step 2 - You are done. Enjoy Bonus features -Your app is now using SiteMesh 3 and is no longer using SiteMesh 2. NO FURTHER CHANGES NEEDED. - -**Bonus**: You can now enjoy multiple layouts on each page! - - -For instance, let's use `/grails-app/views/layouts/googleAnalyticsLayout.gsp` and `/grails-app/views/layouts/main.gsp`: - -```html - - - - Home - -``` +Grails Plugin that adds support for [SiteMesh 3](https://github.com/sitemesh/sitemesh3) \ No newline at end of file diff --git a/grails-plugin-sitemesh3/build.gradle b/grails-plugin-sitemesh3/build.gradle index d5bbe9af80..0d9fb224b8 100644 --- a/grails-plugin-sitemesh3/build.gradle +++ b/grails-plugin-sitemesh3/build.gradle @@ -1,200 +1,20 @@ -buildscript { - repositories { - maven { url "https://repo.grails.org/grails/core/" } - } - dependencies { - classpath "org.grails:grails-gradle-plugin:7.0.0-SNAPSHOT" - } -} - -plugins { - id "groovy" - id "war" - id "idea" - id "com.bertramlabs.asset-pipeline" version "5.0.4" - id "application" - id "eclipse" - id 'maven-publish' - id 'java-library' - - id "signing" - id "io.github.gradle-nexus.publish-plugin" version "2.0.0" - id "com.gorylenko.gradle-git-properties" version "2.4.1" -} +version project.projectVersion +group "org.grails.plugins" -apply plugin:"org.grails.grails-web" -apply plugin:"org.grails.grails-gsp" -apply plugin:"org.grails.grails-plugin" +apply from: rootProject.file('gradle/java-config.gradle') -repositories { - mavenCentral() - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } - maven { url "https://repo.grails.org/grails/core/" } +ext { + title = 'SiteMesh 3 Grails Plugin' + description = 'SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in creating sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.' + developers = [ + [id: 'codeconsole', name: 'Scott Murphy Heiberg'] + ] } dependencies { -// for testing purposes -// implementation files('lib/sitemesh-3.1.0-SNAPSHOT.jar', 'lib/spring-boot-starter-sitemesh-3.1.0-SNAPSHOT-plain.jar') - api('org.sitemesh:spring-boot-starter-sitemesh:3.2.2') - runtimeOnly("org.grails:grails-core") - runtimeOnly("org.grails:grails-logging") - implementation("org.grails:grails-plugin-databinding") - implementation("org.grails:grails-plugin-i18n") - implementation("org.grails:grails-plugin-interceptors") - implementation("org.grails:grails-plugin-rest") - implementation("org.grails:grails-plugin-services") - implementation("org.grails:grails-plugin-url-mappings") - implementation("org.grails:grails-web-boot") - implementation("org.grails.plugins:gsp") - runtimeOnly("org.grails.plugins:hibernate5") - runtimeOnly("org.grails.plugins:scaffolding") - runtimeOnly("org.springframework.boot:spring-boot-autoconfigure") - runtimeOnly("org.springframework.boot:spring-boot-starter-actuator") - runtimeOnly("org.springframework.boot:spring-boot-starter-logging") - runtimeOnly("org.springframework.boot:spring-boot-starter-tomcat") - runtimeOnly("org.springframework.boot:spring-boot-starter-validation") - console("org.grails:grails-console") - runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:5.0.4") - runtimeOnly("com.h2database:h2") - runtimeOnly("org.apache.tomcat:tomcat-jdbc") - runtimeOnly("org.fusesource.jansi:jansi:1.18") - - runtimeOnly "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:2.0.0" - runtimeOnly "org.glassfish.web:jakarta.servlet.jsp.jstl:2.0.0" - runtimeOnly 'org.apache.tomcat.embed:tomcat-embed-jasper:10.1.0' // jsp example - - api "org.grails:grails-web-gsp-taglib:${grailsGspVersion}" -} - -application { - mainClass.set("org.sitemesh.grails.plugins.sitemesh3.Application") -} - -tasks.withType(Test) { - useJUnitPlatform() -} - -assets { - minifyJs = true - minifyCss = true - packagePlugin = true -} - -// https://github.com/grails/grails-core/issues/12213 -jar { - exclude 'gsp**' - exclude 'META-INF/assets**' - exclude 'messages*.properties*' - exclude 'layouts' - - List excludes = ['BootStrap','Application','UrlMappings', 'DemoController'] - excludes.each { - exclude "**/${it}*.class" - } - eachFile { copyDetails -> - if (copyDetails.path.contains('grails-plugin.xml')) { - filter { line -> excludes.find{line.contains(it)}? null : line} - } - } -// https://stackoverflow.com/questions/29147643/how-to-exclude-dependencies-in-the-pom-file-generated-by-the-gradle -// https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable.and-plain-archives - archiveClassifier='' -// enabled = false -} - -// https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html -tasks.withType(GenerateModuleMetadata) { - enabled = false -} - -group = "org.sitemesh" - -java { - sourceCompatibility = JavaVersion.toVersion("17") - withSourcesJar() - withJavadocJar() -} - -// https://docs.gradle.org/current/userguide/java_library_plugin.html#:~:text=The%20api%20configuration%20should%20be,are%20internal%20to%20the%20component. -// https://dev.to/art_ptushkin/gradle-maven-scopes-cheat-sheet-4i56 -publishing { - if (!project.version.toString().endsWith('SNAPSHOT')) { - repositories { - maven { - credentials { - username = System.getenv('MAVEN_PUBLISH_USERNAME') - password = System.getenv('MAVEN_PUBLISH_PASSWORD') - } - url = 'https://maven.pkg.github.com/codeconsole/grails-plugin-sitemesh3' - } - } - } - publications { - maven(MavenPublication) { - from components.java - // https://stackoverflow.com/questions/29147643/how-to-exclude-dependencies-in-the-pom-file-generated-by-the-gradle - pom.withXml { - asNode().dependencies.dependency.each { dep -> - if (dep.scope.last().value().last() == 'runtime') { - assert dep.parent().remove(dep) - } - } - asNode().dependencyManagement?.replaceNode {} - } - versionMapping { - usage('java-api') { - fromResolutionOf('runtimeClasspath') - } - } - pom { - name = "SiteMesh 3 Grails Plugin" - description = 'SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in creating sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.' - url = 'https://github.com/sitemesh/sitemesh3' - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' - } - } - developers { - developer { - id = 'codeconsole' - name = 'Scott Murphy Heiberg' - } - } - scm { - connection = 'scm:git:git://github.com/sitemesh/sitemesh3.git' - developerConnection = 'scm:git:git@github.com:sitemesh/sitemesh3.git' - url = 'https://github.com/sitemesh/sitemesh3/' - } - issueManagement { - system = 'GitHub' - url = 'https://github.com/sitemesh/sitemesh3/issues' - } - } - } - } -} - -signing { - useInMemoryPgpKeys(System.getenv('SIGNING_KEY'), System.getenv('SIGNING_PASSWORD')) - sign publishing.publications.maven -} - -nexusPublishing { - repositories { - sonatype { - username = System.getenv('SONATYPE_USERNAME') - password = System.getenv('SONATYPE_PASSWORD') - } - } -} - -bootRun { - String springProfilesActive = 'spring.profiles.active' - systemProperty springProfilesActive, System.getProperty(springProfilesActive) + api "org.sitemesh:spring-boot-starter-sitemesh:$sitemeshLibraryVersion" + api project(':grails-web-gsp-taglib') } -groovydoc.dependsOn jar -javadoc.dependsOn jar \ No newline at end of file +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') diff --git a/grails-plugin-sitemesh3/gradle.properties b/grails-plugin-sitemesh3/gradle.properties deleted file mode 100644 index a2843d55d2..0000000000 --- a/grails-plugin-sitemesh3/gradle.properties +++ /dev/null @@ -1,10 +0,0 @@ -version=7.0.0-M1 -grailsVersion=7.0.0-SNAPSHOT -grailsGspVersion=7.0.0-M1 -grailsGradlePluginVersion=7.0.0-SNAPSHOT -groovyVersion=4.0.24 -org.gradle.caching=true -org.gradle.daemon=true -org.gradle.parallel=true -org.gradle.jvmArgs=-Dfile.encoding=UTF-8 -Xmx1024M -slf4jPreventExclusion=true \ No newline at end of file diff --git a/grails-plugin-sitemesh3/gradle/wrapper/gradle-wrapper.jar b/grails-plugin-sitemesh3/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a4b76b9530..0000000000 Binary files a/grails-plugin-sitemesh3/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/grails-plugin-sitemesh3/gradle/wrapper/gradle-wrapper.properties b/grails-plugin-sitemesh3/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index e2847c8200..0000000000 --- a/grails-plugin-sitemesh3/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/grails-plugin-sitemesh3/gradlew b/grails-plugin-sitemesh3/gradlew deleted file mode 100755 index f5feea6d6b..0000000000 --- a/grails-plugin-sitemesh3/gradlew +++ /dev/null @@ -1,252 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/grails-plugin-sitemesh3/gradlew.bat b/grails-plugin-sitemesh3/gradlew.bat deleted file mode 100644 index 9b42019c79..0000000000 --- a/grails-plugin-sitemesh3/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/grails-plugin-sitemesh3/settings.gradle b/grails-plugin-sitemesh3/settings.gradle deleted file mode 100644 index c8ea3ee6f6..0000000000 --- a/grails-plugin-sitemesh3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name="grails-plugin-sitemesh3" \ No newline at end of file diff --git a/grails-plugin-sitemesh3/src/integration-test/groovy/.gitkeep b/grails-plugin-sitemesh3/src/integration-test/groovy/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/grails-plugin-sitemesh3/src/main/groovy/org/sitemesh/grails/plugins/sitemesh3/GrailsLayoutHandlerMapping.java b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/sitemesh3/GrailsLayoutHandlerMapping.java similarity index 97% rename from grails-plugin-sitemesh3/src/main/groovy/org/sitemesh/grails/plugins/sitemesh3/GrailsLayoutHandlerMapping.java rename to grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/sitemesh3/GrailsLayoutHandlerMapping.java index d0e9b66ab4..506b833657 100644 --- a/grails-plugin-sitemesh3/src/main/groovy/org/sitemesh/grails/plugins/sitemesh3/GrailsLayoutHandlerMapping.java +++ b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/sitemesh3/GrailsLayoutHandlerMapping.java @@ -1,4 +1,4 @@ -package org.sitemesh.grails.plugins.sitemesh3; +package org.grails.plugins.sitemesh3; import org.grails.web.gsp.io.GrailsConventionGroovyPageLocator; import org.springframework.beans.factory.annotation.Autowired; diff --git a/grails-plugin-sitemesh3/src/main/groovy/org/sitemesh/grails/plugins/sitemesh3/Sitemesh3GrailsPlugin.groovy b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/sitemesh3/Sitemesh3GrailsPlugin.groovy similarity index 85% rename from grails-plugin-sitemesh3/src/main/groovy/org/sitemesh/grails/plugins/sitemesh3/Sitemesh3GrailsPlugin.groovy rename to grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/sitemesh3/Sitemesh3GrailsPlugin.groovy index bcc51f9f5f..8d9a8e80a5 100644 --- a/grails-plugin-sitemesh3/src/main/groovy/org/sitemesh/grails/plugins/sitemesh3/Sitemesh3GrailsPlugin.groovy +++ b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/sitemesh3/Sitemesh3GrailsPlugin.groovy @@ -1,7 +1,9 @@ -package org.sitemesh.grails.plugins.sitemesh3 +package org.grails.plugins.sitemesh3 import grails.plugins.Plugin import org.grails.config.PropertySourcesConfig +import org.grails.plugins.web.taglib.RenderSitemeshTagLib +import org.grails.plugins.web.taglib.SitemeshTagLib import org.grails.web.config.http.GrailsFilters import org.grails.web.util.WebUtils import org.springframework.core.env.ConfigurableEnvironment @@ -11,25 +13,24 @@ import org.springframework.core.env.PropertySource class Sitemesh3GrailsPlugin extends Plugin { def grailsVersion = "7.0.0-SNAPSHOT > *" - def pluginExcludes = [ - "grails-app/views/error.gsp" - ] def title = "SiteMesh 3" def author = "Scott Murphy" def authorEmail = "" def description = "Configures Grails to use SiteMesh 3 instead of SiteMesh 2" def profiles = ['web'] - def documentation = "https://github.com/codeconsole/grails-sitemesh3" def license = "APACHE" - def organization = [name: "SiteMesh", url: "https://github.com/sitemesh"] + def developers = [[name: "Scott Murphy"]] - def issueManagement = [system: "GitHub", url: "https://github.com/codeconsole/grails-sitemesh3/issues"] - def scm = [url: "https://github.com/codeconsole/grails-sitemesh3"] def loadBefore = ['groovyPages'] + def providedArtefacts = [ + RenderSitemeshTagLib, + SitemeshTagLib, + ] + static PropertySource getDefaultPropertySource(ConfigurableEnvironment configurableEnvironment, String defaultLayout) { Map props = [ diff --git a/grails-plugin-sitemesh3/grails-app/taglib/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy similarity index 97% rename from grails-plugin-sitemesh3/grails-app/taglib/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy rename to grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy index ee87e109e7..bff6413a9e 100644 --- a/grails-plugin-sitemesh3/grails-app/taglib/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy +++ b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy @@ -9,10 +9,13 @@ import org.sitemesh.webapp.contentfilter.ResponseMetaData import org.springframework.beans.factory.annotation.Autowired import org.springframework.beans.factory.annotation.Qualifier import org.springframework.boot.web.servlet.FilterRegistrationBean +import grails.artefact.TagLibrary +import grails.gsp.TagLib import java.nio.CharBuffer -class RenderSitemeshTagLib { +@TagLib +class RenderSitemeshTagLib implements TagLibrary { SiteMeshFilter siteMeshFilter diff --git a/grails-plugin-sitemesh3/grails-app/taglib/org/grails/plugins/web/taglib/SitemeshTagLib.groovy b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/SitemeshTagLib.groovy similarity index 97% rename from grails-plugin-sitemesh3/grails-app/taglib/org/grails/plugins/web/taglib/SitemeshTagLib.groovy rename to grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/SitemeshTagLib.groovy index 1169b33881..88bcf64fc6 100644 --- a/grails-plugin-sitemesh3/grails-app/taglib/org/grails/plugins/web/taglib/SitemeshTagLib.groovy +++ b/grails-plugin-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/SitemeshTagLib.groovy @@ -4,8 +4,11 @@ import org.grails.buffer.GrailsPrintWriter import org.grails.buffer.StreamCharBuffer import org.grails.encoder.CodecLookup import org.grails.encoder.Encoder +import grails.artefact.TagLibrary +import grails.gsp.TagLib -class SitemeshTagLib { +@TagLib +class SitemeshTagLib implements TagLibrary { static String namespace = 'sitemesh' CodecLookup codecLookup // from org.grails.gsp.compiler.SitemeshPreprocessor diff --git a/grails-plugin-sitemesh3/src/test/groovy/.gitkeep b/grails-plugin-sitemesh3/src/test/groovy/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/grails-taglib/build.gradle b/grails-taglib/build.gradle index ce95f5c0e3..90d5c2966c 100644 --- a/grails-taglib/build.gradle +++ b/grails-taglib/build.gradle @@ -1,5 +1,12 @@ +version project.projectVersion +group "org.grails" + +apply from: rootProject.file('gradle/java-config.gradle') + dependencies { - documentation platform("org.grails:grails-bom:$grailsVersion") - api "org.grails:grails-core:$grailsVersion" - api "org.grails:grails-encoder:$grailsVersion" + api "org.grails:grails-core" + api "org.grails:grails-encoder" } + +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') diff --git a/grails-web-gsp-taglib/build.gradle b/grails-web-gsp-taglib/build.gradle index 245bcba864..370c3765c6 100644 --- a/grails-web-gsp-taglib/build.gradle +++ b/grails-web-gsp-taglib/build.gradle @@ -1,4 +1,11 @@ +version project.projectVersion +group "org.grails" + +apply from: rootProject.file('gradle/java-config.gradle') + dependencies { - compileOnly "jakarta.servlet:jakarta.servlet-api" api project(':grails-web-jsp') } + +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') diff --git a/grails-web-gsp/build.gradle b/grails-web-gsp/build.gradle index bd5f1bb640..211d7f2c91 100644 --- a/grails-web-gsp/build.gradle +++ b/grails-web-gsp/build.gradle @@ -1,9 +1,17 @@ +version project.projectVersion +group "org.grails" + +apply from: rootProject.file('gradle/java-config.gradle') + dependencies { compileOnly "org.apache.ant:ant" api project(":grails-gsp") - api "org.grails:grails-web-common:$grailsVersion" + api "org.grails:grails-web-common" api project(":grails-web-taglib") testImplementation "net.bytebuddy:byte-buddy" testRuntimeOnly "org.grails:grails-spring" } + +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') diff --git a/grails-web-jsp/build.gradle b/grails-web-jsp/build.gradle index 10c7147a38..e59dfca051 100644 --- a/grails-web-jsp/build.gradle +++ b/grails-web-jsp/build.gradle @@ -1,11 +1,16 @@ +version project.projectVersion +group "org.grails" + +apply from: rootProject.file('gradle/java-config.gradle') + dependencies { - api "org.grails:grails-web-common:$grailsVersion" + api "org.grails:grails-web-common" api project(":grails-web-gsp") - - compileOnly "jakarta.servlet:jakarta.servlet-api" // Required for JSP support compileOnly "jakarta.servlet.jsp:jakarta.servlet.jsp-api:$jspApiVersion" compileOnly "jakarta.el:jakarta.el-api:$elApiVersion" - } + +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') diff --git a/grails-web-taglib/build.gradle b/grails-web-taglib/build.gradle index e1e07fb9ab..6fcdc32d83 100644 --- a/grails-web-taglib/build.gradle +++ b/grails-web-taglib/build.gradle @@ -1,6 +1,11 @@ +version project.projectVersion +group "org.grails" + +apply from: rootProject.file('gradle/java-config.gradle') + dependencies { - compileOnlyApi "jakarta.servlet:jakarta.servlet-api:${servletApiVersion}" // api needed for TagLibrary trait - api "org.grails:grails-web-common:$grailsVersion" + compileOnlyApi "jakarta.servlet:jakarta.servlet-api" // api needed for TagLibrary trait + api "org.grails:grails-web-common" api project(":grails-taglib") compileOnly project(":grails-gsp") testImplementation project(":grails-gsp") @@ -8,9 +13,12 @@ dependencies { testRuntimeOnly "org.grails:grails-spring" } -// TODO: Remove this after update to Grails 5.0.0.M2 +// work around for issue #10118 compileGroovy.doLast { // unfortunate workaround, since the generated one overrides the one in src/main/resources final String compileGroovyTargetDir = tasks.compileGroovy.destinationDirectory.getAsFile().getOrNull()?.path ?: "build/classes/groovy/main" project.delete(compileGroovyTargetDir + "/META-INF/grails.factories") } + +apply from: rootProject.file('gradle/test.gradle') +apply from: rootProject.file('gradle/publish.gradle') \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 9d433d8783..feee5b5ae0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -27,10 +27,17 @@ buildCache { rootProject.name = 'grails-gsp' +include 'docs' include 'grails-gsp' include 'grails-plugin-gsp' +include 'grails-plugin-sitemesh3' include 'grails-taglib' include 'grails-web-gsp' include 'grails-web-gsp-taglib' include 'grails-web-jsp' include 'grails-web-taglib' + +// Examples +include 'examples-sitemesh3' + +project(':examples-sitemesh3').projectDir = file('examples/sitemesh3') \ No newline at end of file