Repository navigation
Remove the vestigial gspCompile configuration - #16088
Merged
jdaugherty merged 1 commit intoAug 3, 2026
Merged
jdaugherty merged 1 commit into
jdaugherty merged 1 commit into
Conversation
Follow-up to apache#16068, which removed the hardcoded servlet API dependency that gspCompile carried. The configuration was introduced in 2014 as the classpath for the original Ant-based GSP compiler, which ran via IsolatedAntBuilder: antBuilder.withClasspath(project.configurations.gspCompile) It held the two artifacts that compiler needed - grails-web-gsp and the servlet API. When GSP compilation moved to the forked GroovyPageForkCompileTask, whose classpath is compileClasspath + gspCompile + compiled classes + providedCompile, the grails-web-gsp entry was dropped and only the servlet API line remained. apache#16068 removed that, leaving a configuration that is empty for every build and contributes no files to the GSP compile classpath. GSPs continue to compile against compileClasspath, the project's compiled classes and providedCompile, which is what actually supplies everything GSP compilation needs. This is a behavior break for any build that declares dependencies on gspCompile: those fail with "Could not find method gspCompile()". Documented in the Grails 8 upgrade guide with the migration to compileOnly, which lands on the same compile classpath. Adds GroovyPagePluginFunctionalSpec, a TestKit spec that applies org.apache.grails.gradle.grails-gsp and asserts the configuration is gone while compileGroovyPages and compileWebappGroovyPages still resolve the compile classpath, provided dependencies and compiled classes. Verified the first assertion fails when the configuration is restored. Verified with :grails-gradle-plugins:test --rerun-tasks (90 tests), :grails-gradle-plugins:check, aggregateViolations (Checkstyle, CodeNarc, PMD, SpotBugs all clean) and :grails-doc:publishGuide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #16088 +/- ##
==================================================
- Coverage 51.9837% 51.9701% -0.0135%
+ Complexity 18036 18029 -7
==================================================
Files 2038 2038
Lines 95707 95705 -2
Branches 16648 16648
==================================================
- Hits 49752 49738 -14
- Misses 38619 38628 +9
- Partials 7336 7339 +3
🚀 New features to boost your workflow:
|
✅ All tests passed ✅🏷️ Commit: 80bf683 Learn more about TestLens at testlens.app. |
codeconsole
requested review from
jdaugherty,
matrei and
sbglasius
and removed request for
jdaugherty
August 3, 2026 03:09
matrei
approved these changes
Aug 3, 2026
jdaugherty
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #16068. In that PR @matrei noted:
There is no use case. This removes it.
Where it came from
gspCompilewas introduced in 2014 (42c739f) as the classpath for the original Ant-based GSP compiler, which ran throughIsolatedAntBuilder:It held the two artifacts that compiler needed —
grails-web-gspand the servlet API. It was never an extension point; it was the compiler's own toolchain classpath.When GSP compilation moved to the forked
GroovyPageForkCompileTask— classpathcompileClasspath + gspCompile + compiled classes + providedCompile— thegrails-web-gspentry was dropped and only the servlet API line survived. #16068 removed that line, which leaves a configuration that is empty in every build and contributes no files to the GSP compile classpath.What still supplies the classpath
GSPs compile against
compileClasspath, the project's compiled classes, andprovidedCompilefor a WAR build. That is what actually supplies everything GSP compilation needs, and it is unchanged here.Behavior break
A build that declares dependencies on
gspCompilenow fails withCould not find method gspCompile(). The migration iscompileOnly, which lands on the same compile classpath the GSP compiler reads:dependencies { // Grails 7 // gspCompile 'com.example:some-library:1.0' // Grails 8 compileOnly 'com.example:some-library:1.0' }Documented as section 41 of the Grails 8 upgrade guide.
Tests
Adds
GroovyPagePluginFunctionalSpec, a TestKit spec that appliesorg.apache.grails.gradle.grails-gspto a project and asserts the configuration is gone whilecompileGroovyPagesandcompileWebappGroovyPagesstill resolve the compile classpath, provided dependencies and compiled classes. The classpath assertions use marker directories as file dependencies, so nothing is resolved from a repository. The first assertion was verified to fail when the configuration is restored.Verified with
:grails-gradle-plugins:test --rerun-tasks(90 tests),:grails-gradle-plugins:check,aggregateViolations(Checkstyle, CodeNarc, PMD, SpotBugs all clean) and:grails-doc:publishGuide.