You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/09/08 20:45:13 UTC

(grails-intellij-plugin) 01/02: Updating dependencies & fixing deprecations

This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch dependencies-and-cleanup
in repository https://gitbox.apache.org/repos/asf/grails-intellij-plugin.git

commit 52311ac40fe3dee89b8eec85ff8e163d92d6feb7
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Tue Sep 8 16:27:09 2026 -0400

    Updating dependencies & fixing deprecations
---
 .github/dependabot.yml                             |  16 ++
 .github/workflows/codeql.yml                       |   6 +-
 .github/workflows/coverage.yml                     |   4 +-
 .github/workflows/gradle.yml                       |   8 +-
 .github/workflows/rat.yml                          |   9 +-
 .github/workflows/release.yml                      |  12 +-
 .github/workflows/vulnerability-scan.yml           |   4 +-
 .gitignore                                         |   9 +
 .sdkmanrc                                          |   2 +-
 AGENTS.md                                          |  25 ++-
 INSTALL                                            |   6 +-
 MIGRATION-PLAN.md                                  |  12 +-
 README.md                                          |   8 +-
 RELEASE.md                                         |   2 +-
 build-logic/build.gradle                           |   6 +-
 ...he.grails.intellij.build.intellij-plugin.gradle |  14 +-
 .../org.apache.grails.intellij.build.jacoco.gradle |   2 +-
 .../org.apache.grails.intellij.build.rat.gradle    |  11 +
 etc/bin/apply-asf-headers.py                       | 222 ---------------------
 gradle.properties                                  |   8 +-
 gradle/wrapper/gradle-wrapper.jar                  | Bin 48462 -> 47505 bytes
 gradle/wrapper/gradle-wrapper.properties           |   2 +-
 plugin/build.gradle                                |   3 +-
 .../jetbrains/plugins/grails/GroovyMvcIcons.java   |  24 +--
 .../plugin/GrailsAttachSourcesProvider.java        |  26 ++-
 .../plugin/GrailsConsoleFilterProvider.java        |   2 +-
 .../plugin/actions/NewGrailsXXXAction.java         |   2 -
 .../intellij/plugin/actions/NewGspAction.java      |  21 --
 .../addins/js/JavaScriptIntegrationUtil.java       |   2 +-
 .../intellij/plugin/config/GradleSettingsFile.java | 109 ++++++++++
 .../config/GrailsGradleAwareModuleBuilder.java     |   6 +-
 .../plugin/config/GrailsModuleBuilder.java         |  10 +-
 .../plugin/editor/GrailsEditorToolbar.java         |  15 +-
 .../editor/toolbar/GrailsToolbarActionBase.java    |   9 +-
 .../intellij/plugin/fileType/GspFileType.java      |  23 ++-
 .../gson/GsonModelFieldArgumentDescriptor.java     |   4 +-
 .../gsp/debug/GspJavaDebugAware.java}              |  34 ++--
 .../plugin/lang/gsp/debug/GspPositionManager.java  |   6 +-
 .../lang/gsp/formatter/GspBlockGenerator.java      |   9 +-
 .../settings/GspCodeStyleSettingsProvider.java     |   4 +-
 .../gsp/highlighter/GspIndexPatternBuilder.java    |  26 +--
 .../lang/gsp/psi/GspPsiElementFactoryImpl.java     |   2 +-
 .../plugin/lang/gsp/psi/gsp/impl/GspFileImpl.java  |   4 +-
 .../gsp/psi/gsp/impl/gtag/GspGrailsTagImpl.java    |   3 +-
 .../plugin/mvc/MvcModuleStructureSynchronizer.java |  12 +-
 .../plugin/mvc/MvcModuleStructureUtil.java         |   5 +-
 .../mvc/plugins/InstallUninstallPluginsDialog.java |  28 ++-
 .../intellij/plugin/mvc/plugins/MvcPluginUtil.java |  10 +-
 .../plugin/mvc/plugins/MvcPluginsMain.java         |   6 +-
 .../PerspectiveFileEditorComponent.java            |   4 +-
 .../perspectives/create/CreateNewRelation.java     |   6 +-
 .../intellij/plugin/plugins/GrailsPlugins.java     |   4 +-
 .../projectView/nodes/GrailsFlatPackageNode.java   |   5 +-
 .../nodes/GrailsRegularPackageNode.java            |   5 +-
 .../common/GrailsEncodingReferenceProvider.java    |  11 +-
 .../domain/GormFetchModeCompletionProvider.java    |   5 +-
 .../runner/GrailsAppEngineDebuggerRunner.java      |   2 +-
 .../intellij/plugin/runner/GrailsConsole.java      |  11 +-
 .../plugin/runner/GrailsRunConfiguration.java      |   3 +-
 ...atableRunConfigurationWithCommonParameters.java |   5 +-
 .../impl/Grails3InstallationCommandExecutor.java   |   3 +-
 .../runner/impl/Grails3TestCommandLineState.java   |  43 +---
 .../impl/GrailsInstallationCommandExecutor.java    |  15 +-
 .../runner/ui/GrailsApplicationCombobox.java       |  30 ++-
 .../runner/ui/GrailsRunConfigurationEditor.java    |   9 +-
 .../plugin/runner/util/GrailsExecutionUtils.java   |   4 +-
 .../plugin/service/GrailsBackgroundService.java    |  91 ++++++++-
 .../plugin/spring/GrailsSpringBeanDiscoverer.java  |  11 +-
 ...ilsSpringStereotypeAliasingPsiTargetMapper.java |  34 ++--
 .../plugin/structure/GrailsApplicationManager.java |  17 +-
 .../plugin/structure/impl/Grails2Application.java  |   4 +-
 .../sync/GrailsApplicationBackgroundTask.java      |   2 +-
 .../plugin/structure/sync/GrailsSdkCheckTask.java  |  14 +-
 .../runner/ui/GrailsRunConfigurationEditor.form    |  10 +-
 plugin/src/main/resources/META-INF/plugin.xml      |   1 +
 .../resources/messages/GrailsBundle.properties     |   9 +-
 .../module/maven/MavenCommandExecutorTest.java     | 168 ++++++++++++++++
 .../plugin/GrailsAttachSourcesProviderTest.java    | 220 ++++++++++++++++++++
 .../plugin/config/GradleSettingsFileTest.java      |  93 +++++++++
 .../intellij/plugin/gsp/GspJavaDebugAwareTest.java |  43 ++++
 .../service/GrailsBackgroundServiceTest.java       |  79 ++++++++
 .../hibernate/Grails3HibernateFacetActivity.java   |   4 +-
 .../module/maven/MavenCommandExecutor.java         |  11 +-
 83 files changed, 1198 insertions(+), 571 deletions(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 24cdef9..3ff74b4 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -24,6 +24,22 @@ updates:
     target-branch: main
     labels:
       - "type: dependency upgrade"
+    ignore:
+      # Era-pinned on purpose, never to be bumped. plugin/build.gradle resolves the mock Grails
+      # installations under plugin/testdata/ from Maven at test time; those coordinates are test
+      # fixtures for the Grails 1.1 and 1.4 layouts the tests exercise, not dependencies of the
+      # plugin, and bumping one silently turns a Grails 1.x fixture into a Grails 6 one. Likewise
+      # libs/grails-rt and compilers/grails-compiler-patch compile against the Grails/Groovy of
+      # the builds they run inside (Grails 1.x/2.x), so a newer release would be the wrong API.
+      - dependency-name: "org.grails:*"
+      - dependency-name: "org.codehaus.groovy:*"
+      - dependency-name: "org.springframework:*"
+      - dependency-name: "org.hibernate:*"
+      - dependency-name: "org.mortbay.jetty:*"
+      - dependency-name: "org.spockframework:*"
+      # junit:junit appears twice in plugin/build.gradle: the mockGrails11 fixture pins 4.8.1 and
+      # the test suite is on 4.13.2, the final JUnit 4 release. Ignored so the fixture stays put.
+      - dependency-name: "junit:junit"
   # build-logic included build (convention plugins + their tool dependencies)
   - package-ecosystem: gradle
     directory: "/build-logic"
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index d65acee..3daa7a7 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -42,14 +42,14 @@ jobs:
       - name: "๐Ÿ“ฅ Checkout repository"
         uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: liberica # .sdkmanrc pins librca = Liberica
           java-version: 25
       - name: "๐Ÿ”Ž Initialize CodeQL"
-        uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
+        uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
         with:
           languages: ${{ matrix.language }}
           build-mode: none
       - name: "๐Ÿ”ฌ Perform CodeQL Analysis"
-        uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
+        uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index a6d590e..1a8ee40 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -34,12 +34,12 @@ jobs:
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: liberica # .sdkmanrc pins librca = Liberica
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
       - name: "๐ŸŒก๏ธ Run tests with coverage"
diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index 4a8d728..ccf4461 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -35,12 +35,12 @@ jobs:
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: liberica # .sdkmanrc pins librca = Liberica
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
       - name: "๐Ÿ—๏ธ Build & Test"
@@ -78,12 +78,12 @@ jobs:
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: liberica # .sdkmanrc pins librca = Liberica
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # see note above
       - name: "๐Ÿ”Ž IntelliJ Plugin Verifier"
diff --git a/.github/workflows/rat.yml b/.github/workflows/rat.yml
index 53de90f..ed910c6 100644
--- a/.github/workflows/rat.yml
+++ b/.github/workflows/rat.yml
@@ -32,21 +32,16 @@ jobs:
     steps:
       - name: "๐Ÿ“ฅ Checkout repository"
         uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
-      - name: "๐Ÿงพ Verify the canonical ASF source header"
-        # RAT cannot do this: the JetBrains-attributed boilerplate the codebase carried before the
-        # software grant and the ASF header are both the ALv2 appendix to it, so RAT is green either
-        # way. This is what pins every file to the header text in HEADER.
-        run: ./etc/bin/apply-asf-headers.py --check
       - name: "๐Ÿ“ Read JDK version from .sdkmanrc"
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: liberica # .sdkmanrc pins librca = Liberica
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
       - name: "๐Ÿง Apache License - Release Audit Tool"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 65c4d25..145749f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -56,12 +56,12 @@ jobs:
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: ${{ env.JAVA_DISTRIBUTION }}
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
       - name: "๐Ÿ—๏ธ Build & Test"
@@ -105,7 +105,7 @@ jobs:
       - name: "๐Ÿ“ฆ Create plugin ZIP checksum"
         run: sha512sum ${DIST_NAME}-${VERSION}-bin.zip > ${DIST_NAME}-${VERSION}-bin.zip.sha512
       - name: "๐Ÿš€ Upload plugin ZIP to GitHub Release"
-        uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
+        uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
         with:
           tag_name: ${{ env.TAG }}
           files: |
@@ -157,7 +157,7 @@ jobs:
       - name: "๐Ÿ“ฆ Create source distribution checksum"
         run: sha512sum ${DIST_NAME}-${VERSION}-src.zip > ${DIST_NAME}-${VERSION}-src.zip.sha512
       - name: "๐Ÿš€ Upload ZIP and Signature to GitHub Release"
-        uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
+        uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
         with:
           tag_name: ${{ env.TAG }}
           files: |
@@ -338,12 +338,12 @@ jobs:
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: ${{ env.JAVA_DISTRIBUTION }}
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # see note above
       - name: "๐Ÿ“ฅ Fetch the promoted plugin ZIP from dist.apache.org"
diff --git a/.github/workflows/vulnerability-scan.yml b/.github/workflows/vulnerability-scan.yml
index 902e892..74e4610 100644
--- a/.github/workflows/vulnerability-scan.yml
+++ b/.github/workflows/vulnerability-scan.yml
@@ -36,12 +36,12 @@ jobs:
         id: sdkmanrc
         run: echo "java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2 | sed 's/-librca$//')" >> "$GITHUB_OUTPUT"
       - name: "โ˜•๏ธ Setup JDK"
-        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
+        uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
         with:
           distribution: liberica # .sdkmanrc pins librca = Liberica
           java-version: ${{ steps.sdkmanrc.outputs.java }}
       - name: "๐Ÿ˜ Setup Gradle"
-        uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
+        uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
         with:
           cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use)
       - name: "๐Ÿ” Run OSS Index Vulnerability Scan"
diff --git a/.gitignore b/.gitignore
index 49ef476..6ed4192 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,13 @@
 .idea
+# Eclipse/JDT metadata and generated project output; keep the source scripts in etc/bin.
+.classpath
+.project
+.settings/
+/build-logic/bin/
+/plugin/bin/
+/libs/*/bin/
+/compilers/*/bin/
+/pluginModules/*/bin/
 # Gradle build directories, matched by depth rather than **/build: build-logic's convention
 # plugins live in package org.apache.grails.intellij.build, so **/build silently swallowed
 # build-logic/src/main/groovy/org/apache/grails/intellij/build/ and its sources were never
diff --git a/.sdkmanrc b/.sdkmanrc
index 30e189b..95df7de 100644
--- a/.sdkmanrc
+++ b/.sdkmanrc
@@ -16,4 +16,4 @@
 # Enable auto-env through the sdkman_auto_env config
 # Add key=value pairs of SDKs to use below
 java=25.0.3-librca
-gradle=9.6.1
+gradle=9.7.1
diff --git a/AGENTS.md b/AGENTS.md
index 57348d9..45890f1 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -38,6 +38,9 @@ limitations under the License.
 ./gradlew verifyPlugin
 ./gradlew rat
 ./gradlew runIde
+
+# Plugin Verifier against specific builds (e.g. the next EAP) instead of the recommended set
+./gradlew verifyPlugin -PpluginVerifierIdes=IU-263.3889.65
 ```
 
 ## Critical Rules
@@ -59,9 +62,8 @@ limitations under the License.
      header** โ€” attribution lives in `NOTICE`. The `Copyright 2000-2026 JetBrains s.r.o. and
      contributors` form the codebase was imported with is gone as of the software grant and
      must not reappear.
-   - `./etc/bin/apply-asf-headers.py --check` is the guard, and runs in the RAT workflow;
-     without `--check` it rewrites. RAT cannot do this job โ€” both header forms are the ALv2
-     appendix to it, so it is green either way.
+   - `./gradlew rat` is the ongoing Apache 2.0 license check and runs in the RAT workflow.
+     The one-time header migration is complete; use `HEADER` for new files.
 5. **Test-fixture JDK conventions (2026.2+)** โ€” Mock JDK 1.7 is no longer shipped:
    - **Light fixtures**: `GrailsTestCase` pins `DefaultLightProjectDescriptor(IdeaTestUtil::getMockJdk11)`
      via `getTestJdk()`. Override `getTestJdk()` to a real JDK only when the test needs
@@ -76,7 +78,7 @@ limitations under the License.
 6. **Don't add license headers to `testdata/`** โ€” the content *is* the test input;
    headers break parser/position-sensitive tests.
 7. **No wildcard imports** โ€” use explicit imports, matching the existing sources.
-8. **JDK is pinned via `.sdkmanrc`** (Java 25, Gradle 9.6.1) โ€” no Gradle toolchain on
+8. **JDK is pinned via `.sdkmanrc`** (Java 25, Gradle 9.7.1) โ€” no Gradle toolchain on
    purpose, for reproducible builds. Run `sdk env` if the build complains about the JDK.
 9. **Remove debug probes before committing** (see Debugging below).
 10. **Retry transient commit failures.** Git commits can fail with
@@ -86,10 +88,10 @@ limitations under the License.
 
 | Component | Version |
 |-----------|---------|
-| IntelliJ Platform | 2026.2 Ultimate (`sinceBuild` 262) |
+| IntelliJ Platform | 2026.2.2 Ultimate (`sinceBuild` 262.10315.125) |
 | JDK (build) | 25 (pinned in `.sdkmanrc`) |
 | JDK (`grails-rt`, `grails-compiler-patch`, `jps-plugin`) | targets Java 8/11 |
-| Gradle | 9.6.1 (wrapper) |
+| Gradle | 9.7.1 (wrapper) |
 | IntelliJ Platform Gradle Plugin | 2.x |
 | Kotlin | 2.4.x (stdlib not bundled) |
 | Tests | JUnit 4 + AssertJ + IntelliJ test framework (light/heavy fixtures) |
@@ -150,12 +152,17 @@ Special packaging: `plugin/standardDsls/` sits outside the resource roots and is
   (`buildPlugin` thrashes below that).
 - Bundled-plugin dependencies are sensitive to platform version splits โ€” e.g.
   `com.intellij.javaee.el` is no longer transitive and `com.intellij.gradle` was split
-  out of `org.jetbrains.plugins.gradle` in 2026.2. When bumping `platformVersion`,
+  out of `org.jetbrains.plugins.gradle` in 2026.2. The JSP implementation (`com.intellij.jsp`)
+  is a pinned Marketplace dependency rather than a bundled plugin in 2026.2.2.
+  When bumping `platformVersion`,
   expect to adjust the `bundledPlugin(...)` list in `plugin/build.gradle` (and in the
   `pluginModules/*/build.gradle` that declares the affected plugin).
 - Plugin Verifier gates on real incompatibilities only (`COMPATIBILITY_PROBLEMS`,
-  `MISSING_DEPENDENCIES`, `INVALID_PLUGIN`); the inherited internal/deprecated API
-  usages are a tracked cleanup item, not a release blocker.
+  `MISSING_DEPENDENCIES`, `INVALID_PLUGIN`); the remaining internal/deprecated API
+  usages are a tracked cleanup item, not a release blocker. The per-usage lists are in
+  `plugin/build/reports/pluginVerifier/<IDE>/plugins/org.intellij.grails/<version>/*.txt`.
+  `-PpluginVerifierIdes=IU-<build>[,IU-<build>]` verifies against exactly those builds, which
+  is how a verdict against an EAP is reproduced before it becomes the recommended release.
 - The legacy plugin id `org.intellij.grails` is grandfathered on Marketplace and
   permanent (see `MIGRATION-PLAN.md`); the `TemplateWordInPluginId` check is muted
   deliberately.
diff --git a/INSTALL b/INSTALL
index caa9331..33102df 100644
--- a/INSTALL
+++ b/INSTALL
@@ -15,7 +15,7 @@ To run the plugin:
 To build the plugin:
 
         JDK      Liberica 25 (25.0.3-librca), pinned in `.sdkmanrc`
-        Gradle   9.6.1, pinned in `.sdkmanrc`
+        Gradle   9.7.1, pinned in `.sdkmanrc`
         Disk     ~10 GB free for the IntelliJ Platform and Gradle caches
         Memory   8 GB or more; the build runs a 4 GB Gradle daemon
         Network  access to Maven Central and the JetBrains repositories
@@ -33,11 +33,11 @@ tools by running the following at the source root:
         sdk env install
 
 Otherwise install the same versions by any means you prefer -- for example
-Liberica JDK 25 (https://bell-sw.com/pages/downloads/) and Gradle 9.6.1
+Liberica JDK 25 (https://bell-sw.com/pages/downloads/) and Gradle 9.7.1
 (https://gradle.org/releases/) -- and put them on PATH:
 
         export JAVA_HOME=/path/to/liberica-jdk-25
-        export PATH="$JAVA_HOME/bin:/path/to/gradle-9.6.1/bin:$PATH"
+        export PATH="$JAVA_HOME/bin:/path/to/gradle-9.7.1/bin:$PATH"
 
 Confirm the versions before continuing:
 
diff --git a/MIGRATION-PLAN.md b/MIGRATION-PLAN.md
index 953ff82..e6e5370 100644
--- a/MIGRATION-PLAN.md
+++ b/MIGRATION-PLAN.md
@@ -210,17 +210,15 @@ Dropped as no longer applicable:
 Unblocked by the JetBrains software grant being filed, and carried out under #23.
 
 - [x] Wholesale replacement of the JetBrains-attributed Apache 2.0 headers with the
-      canonical ASF header from `HEADER` โ€” 948 files, one mechanical commit, by
-      `etc/bin/apply-asf-headers.py` (which replaced the pre-grant
-      `expand-jetbrains-headers.py`). Run in the legacy repo too if the fork has happened.
+      canonical ASF header from `HEADER` โ€” 948 files, one mechanical commit. The one-time
+      migration script has since been retired. Run in the legacy repo too if the fork has happened.
 - [x] Move the JetBrains copyright into `NOTICE` and add the "donated to the ASF" wording.
       **Still to confirm against the executed grant text** โ€” the wording used is
       "donated to the Apache Software Foundation under a software grant", and the
       redundant `Licensed under the Apache License, Version 2.0.` line is gone.
-- [x] The header guard: `apply-asf-headers.py --check`, in the RAT workflow. It enforces the
-      one thing RAT cannot see โ€” *which* ALv2 header a file carries โ€” so it needs no copy of
-      RAT's exclusion list, and it fails on either a JetBrains-attributed header or any other
-      divergence from `HEADER`.
+- [x] The migration-time exact-header guard has been retired now that the conversion is
+      complete. RAT remains the ongoing Apache 2.0 license check; `HEADER` remains the
+      template for new files.
 - [x] Revisit RAT config: no changes needed, as expected (both header forms are Apache-2.0 to
       RAT). Audit re-run after the replacement: 996 standards, all Apache licensed, 0 unknown.
 
diff --git a/README.md b/README.md
index d619db7..39f9058 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ at commit
 
 To **run** the plugin:
 
-- IntelliJ IDEA **Ultimate** 2026.2+ (`sinceBuild` 262). The plugin depends on Ultimate-only
+- IntelliJ IDEA **Ultimate** 2026.2.2+ (`sinceBuild` 262.10315.125). The plugin depends on Ultimate-only
   functionality (JavaEE, Spring, database, microservices) and will not load in Community.
 
 To **build** the plugin:
@@ -24,7 +24,7 @@ To **build** the plugin:
 | | Version | Notes |
 | --- | --- | --- |
 | JDK | Liberica 25 (`25.0.3-librca`) | Pinned in [`.sdkmanrc`](.sdkmanrc). The exact JDK matters โ€” see [reproducible builds](RELEASE.md#verifying-a-reproducible-build). |
-| Gradle | 9.6.1 | Pinned in [`.sdkmanrc`](.sdkmanrc). Only needed to bootstrap the wrapper; otherwise use `./gradlew`. |
+| Gradle | 9.7.1 | Pinned in [`.sdkmanrc`](.sdkmanrc). Only needed to bootstrap the wrapper; otherwise use `./gradlew`. |
 | Git | any recent | To clone the repository. |
 | Disk | ~10 GB free | The IntelliJ Platform and bundled plugins are downloaded into `.intellijPlatform` and the Gradle cache. |
 | Memory | 8 GB+ | The build runs a 4 GB Gradle daemon (set in `gradle.properties`). |
@@ -61,12 +61,12 @@ sdk env            # selects them for the current shell
 
 If you would rather not use SDKMAN!, install the same versions by any means you prefer โ€”
 for example download [Liberica JDK 25](https://bell-sw.com/pages/downloads/) and
-[Gradle 9.6.1](https://gradle.org/releases/) manually โ€” then make sure `java -version`
+[Gradle 9.7.1](https://gradle.org/releases/) manually โ€” then make sure `java -version`
 and `gradle --version` report them:
 
 ```bash
 export JAVA_HOME=/path/to/liberica-jdk-25
-export PATH="$JAVA_HOME/bin:/path/to/gradle-9.6.1/bin:$PATH"
+export PATH="$JAVA_HOME/bin:/path/to/gradle-9.7.1/bin:$PATH"
 ```
 
 Building with a different JDK will usually work, but the artifacts will not be
diff --git a/RELEASE.md b/RELEASE.md
index ae8858d..6b4c96b 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -62,7 +62,7 @@ targets:
 <platform-branch>.<minor>.<patch>        e.g. 262.0.0
 ```
 
-- **platform-branch** โ€” the IntelliJ Platform build branch, matching `pluginSinceBuild` in
+- **platform-branch** โ€” the IntelliJ Platform build branch, matching the first segment of `pluginSinceBuild` in
   [`gradle.properties`](gradle.properties). `262` is the 2026.2 branch.
 - **minor** โ€” incremented for feature work within a platform branch.
 - **patch** โ€” incremented for bug-fix-only releases within a platform branch.
diff --git a/build-logic/build.gradle b/build-logic/build.gradle
index fea276b..f4e4a27 100644
--- a/build-logic/build.gradle
+++ b/build-logic/build.gradle
@@ -34,7 +34,7 @@ group = 'org.apache.grails.intellij.build'
 dependencies {
     // Dependabot (gradle ecosystem, /build-logic) keeps these versions current.
     implementation 'org.jetbrains.intellij.platform:intellij-platform-gradle-plugin:2.18.1'
-    implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.10'
-    implementation 'org.nosphere.apache.rat:org.nosphere.apache.rat.gradle.plugin:0.8.1'
-    implementation 'org.sonatype.gradle.plugins:scan-gradle-plugin:3.1.6'
+    implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.4.20'
+    implementation 'org.nosphere.apache.rat:org.nosphere.apache.rat.gradle.plugin:0.8.2'
+    implementation 'org.sonatype.gradle.plugins:scan-gradle-plugin:4.1.0-02'
 }
diff --git a/build-logic/src/main/groovy/org.apache.grails.intellij.build.intellij-plugin.gradle b/build-logic/src/main/groovy/org.apache.grails.intellij.build.intellij-plugin.gradle
index 1543269..7cfa951 100644
--- a/build-logic/src/main/groovy/org.apache.grails.intellij.build.intellij-plugin.gradle
+++ b/build-logic/src/main/groovy/org.apache.grails.intellij.build.intellij-plugin.gradle
@@ -57,7 +57,19 @@ intellijPlatform {
                 VerifyPluginTask.FailureLevel.INVALID_PLUGIN,
         ]
         ides {
-            recommended()
+            // -PpluginVerifierIdes=IU-263.3889.65[,IU-...] verifies against exactly those builds
+            // instead of the Marketplace-recommended set, which is how a verdict against an EAP
+            // is reproduced (and fixed) before that EAP becomes the recommended release. CI
+            // passes nothing and stays on the recommended set.
+            def requestedIdes = providers.gradleProperty('pluginVerifierIdes')
+            if (requestedIdes.isPresent()) {
+                requestedIdes.get().split(',')*.trim().findAll().each { String notation ->
+                    def (String type, String version) = notation.split('-', 2)
+                    create(type, version)
+                }
+            } else {
+                recommended()
+            }
         }
     }
 
diff --git a/build-logic/src/main/groovy/org.apache.grails.intellij.build.jacoco.gradle b/build-logic/src/main/groovy/org.apache.grails.intellij.build.jacoco.gradle
index af4f961..f035cd0 100644
--- a/build-logic/src/main/groovy/org.apache.grails.intellij.build.jacoco.gradle
+++ b/build-logic/src/main/groovy/org.apache.grails.intellij.build.jacoco.gradle
@@ -27,7 +27,7 @@ plugins {
 
 jacoco {
     // keep in sync with `jacocoVersion` in gradle.properties
-    toolVersion = providers.gradleProperty('jacocoVersion').getOrElse('0.8.14')
+    toolVersion = providers.gradleProperty('jacocoVersion').getOrElse('0.8.15')
 }
 
 tasks.withType(Test).configureEach {
diff --git a/build-logic/src/main/groovy/org.apache.grails.intellij.build.rat.gradle b/build-logic/src/main/groovy/org.apache.grails.intellij.build.rat.gradle
index b985b76..04e71cc 100644
--- a/build-logic/src/main/groovy/org.apache.grails.intellij.build.rat.gradle
+++ b/build-logic/src/main/groovy/org.apache.grails.intellij.build.rat.gradle
@@ -56,6 +56,17 @@ tasks.named('rat') { task ->
             '.idea/**',
             '**/*.iml',
             'out/**',
+            // Eclipse/JDT metadata is generated locally, not source code
+            '**/.classpath',
+            '**/.project',
+            '**/.settings/**',
+            // Eclipse/JDT compiled classes and copied resources; explicit project paths keep
+            // the source scripts under etc/bin audited
+            'build-logic/bin/**',
+            'plugin/bin/**',
+            'libs/*/bin/**',
+            'compilers/*/bin/**',
+            'pluginModules/*/bin/**',
             // IntelliJ Platform Gradle Plugin local cache (generated Ivy descriptors, git-ignored)
             '.intellijPlatform/**',
             // build-logic included build: generated output and local caches (sources are headered)
diff --git a/etc/bin/apply-asf-headers.py b/etc/bin/apply-asf-headers.py
deleted file mode 100755
index 03c0d9f..0000000
--- a/etc/bin/apply-asf-headers.py
+++ /dev/null
@@ -1,222 +0,0 @@
-#!/usr/bin/env python3
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-"""Replace the JetBrains-attributed Apache 2.0 headers with the canonical ASF header.
-
-The JetBrains software grant relocated the copyright notice to NOTICE, and the ASF source
-header policy (https://www.apache.org/legal/src-headers.html#headers) requires the header
-itself to carry no copyright notice.  This rewrites the header in place, in whichever
-comment syntax the file already uses, and changes nothing else.
-
-The header text is read from the HEADER file at the repository root, so that file stays the
-single definition of what the header says.
-
-    ./etc/bin/apply-asf-headers.py            rewrite
-    ./etc/bin/apply-asf-headers.py --check    change nothing, and fail if anything would
-
---check is the CI guard.  RAT already proves every non-excluded file carries an Apache 2.0
-header, but it cannot tell the two forms apart -- the JetBrains-attributed boilerplate and
-the ASF header are both the ALv2 appendix to RAT, which is why it was green before this
-sweep and stays green after.  This closes exactly that gap, and being anchored on the
-copyright notice rather than on a file list, it needs no copy of RAT's exclusions.
-
-Exits non-zero if any file carries a JetBrains-attributed header this script cannot
-identify, so a file is never silently left behind.
-"""
-import argparse
-import os
-import re
-import subprocess
-import sys
-
-REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-COPYRIGHT = re.compile(r"Copyright\s+\d{4}(?:-\d{4})?\s+JetBrains\s+s\.r\.o\.")
-LICENSE_END = re.compile(r"limitations under the License\.")
-# What may legitimately sit above a file's licence header.
-PRELUDE = re.compile(r"\s*$|\s*(#!|<\?xml|//|#|/\*|\*|<!--)")
-
-# Files that mention JetBrains outside a license header: prose about where the codebase came
-# from, and NOTICE, which is where the grant puts the attribution and so must keep it.
-SKIP = {
-    "NOTICE",
-    "README.md",
-    "AGENTS.md",
-    "MIGRATION-PLAN.md",
-    "IMPROVEMENT-PLAN.md",
-    "etc/bin/apply-asf-headers.py",
-}
-
-# Comment syntax by extension: (opening line, line prefix, closing line). A prefix is applied
-# to every line of the header text, which the HEADER file already indents by one space.
-BLOCK = ("/*", " *", " */")
-HASH = (None, "#", None)
-XML = ("<!--", " ", "-->")
-
-BY_EXTENSION = {
-    ".java": BLOCK,
-    ".kt": BLOCK,
-    ".kts": BLOCK,
-    ".gradle": BLOCK,
-    ".groovy": BLOCK,
-    ".gdsl": BLOCK,
-    ".flex": BLOCK,
-    ".properties": HASH,
-    ".py": HASH,
-    ".sh": HASH,
-    ".yml": HASH,
-    ".yaml": HASH,
-    ".xml": XML,
-    ".tld": XML,
-    ".html": XML,
-}
-
-# Extensionless files whose comment syntax cannot be inferred from a suffix: the
-# META-INF/services provider-configuration files, which take '#' comments.
-SERVICES = re.compile(r"/META-INF/services/")
-
-
-def header_lines():
-    with open(os.path.join(REPO_ROOT, "HEADER"), encoding="utf-8") as handle:
-        return handle.read().rstrip("\n").split("\n")
-
-
-def render(style, lines):
-    """Render the header text in one comment syntax."""
-    opening, prefix, closing = style
-    rendered = []
-    if opening is not None:
-        rendered.append(opening)
-    for line in lines:
-        # No trailing whitespace on the blank lines inside the header.
-        rendered.append((prefix + line).rstrip() if line.strip() else prefix.rstrip())
-    if closing is not None:
-        rendered.append(closing)
-    return rendered
-
-
-def style_for(path):
-    if SERVICES.search("/" + path):
-        return HASH
-    return BY_EXTENSION.get(os.path.splitext(path)[1])
-
-
-def find_block(lines, style):
-    """Locate the license comment block: (start, end) inclusive, or None.
-
-    Anchored on the JetBrains copyright line and bounded by the comment syntax, so the shape
-    of the boilerplate in between -- and there are several -- does not matter.
-    """
-    copyright_at = next((i for i, line in enumerate(lines) if COPYRIGHT.search(line)), None)
-    if copyright_at is None:
-        return None
-
-    opening, _, closing = style
-    if opening is not None:
-        start = next((i for i in range(copyright_at, -1, -1) if lines[i].lstrip().startswith(opening)), None)
-        end = next((i for i in range(copyright_at, len(lines)) if closing.strip() in lines[i]), None)
-    else:
-        # A '#' block has no delimiters: it starts at the copyright line and ends on the last
-        # line of the licence text, so any comment that follows it is left alone.
-        start = copyright_at
-        end = next((i for i in range(copyright_at, len(lines)) if LICENSE_END.search(lines[i])), None)
-
-    if start is None or end is None or end < start:
-        return None
-    # A header sits at the top of the file. Only a shebang, an XML declaration, blank lines or
-    # other comments may precede it -- the generated JFlex lexers, for one, put two "// Generated
-    # by" lines first. Anything else means this is a comment from the body of the file.
-    if not all(PRELUDE.match(line) for line in lines[:start]):
-        return None
-    # Guard against matching a comment that merely mentions the copyright.
-    if not any("Apache License" in line for line in lines[start:end + 1]):
-        return None
-    return start, end
-
-
-def tracked_files():
-    out = subprocess.run(["git", "-C", REPO_ROOT, "ls-files", "-z"],
-                         capture_output=True, check=True).stdout
-    return [entry for entry in out.decode("utf-8").split("\0") if entry]
-
-
-def main():
-    parser = argparse.ArgumentParser(description=__doc__)
-    parser.add_argument("--check", action="store_true",
-                        help="change nothing, and exit non-zero if anything would change")
-    args = parser.parse_args()
-
-    lines_of_header = header_lines()
-    rewritten, skipped, unhandled = [], [], []
-
-    for path in tracked_files():
-        if path in SKIP:
-            continue
-        absolute = os.path.join(REPO_ROOT, path)
-        try:
-            with open(absolute, encoding="utf-8") as handle:
-                text = handle.read()
-        except (UnicodeDecodeError, IsADirectoryError, FileNotFoundError):
-            continue
-        if not COPYRIGHT.search(text):
-            continue
-
-        style = style_for(path)
-        if style is None:
-            unhandled.append((path, "no comment syntax known for this file type"))
-            continue
-
-        newline = "\r\n" if "\r\n" in text else "\n"
-        lines = text.split(newline)
-        found = find_block(lines, style)
-        if found is None:
-            unhandled.append((path, "no license header found around the copyright notice"))
-            continue
-
-        start, end = found
-        replacement = lines[:start] + render(style, lines_of_header) + lines[end + 1:]
-        updated = newline.join(replacement)
-        if updated == text:
-            skipped.append(path)
-            continue
-        if not args.check:
-            with open(absolute, "w", encoding="utf-8", newline="") as handle:
-                handle.write(updated)
-        rewritten.append(path)
-
-    for path, reason in unhandled:
-        print(f"UNHANDLED {path}: {reason}", file=sys.stderr)
-
-    if args.check:
-        for path in rewritten:
-            print(f"JetBrains-attributed header: {path}", file=sys.stderr)
-        if rewritten or unhandled:
-            print(f"\n{len(rewritten) + len(unhandled)} file(s) do not carry the canonical ASF "
-                  f"header from HEADER.\nRun ./etc/bin/apply-asf-headers.py to fix.", file=sys.stderr)
-            return 1
-        print("all tracked files carry the canonical ASF header")
-        return 0
-
-    print(f"rewrote {len(rewritten)} files")
-    if unhandled:
-        print(f"\n{len(unhandled)} file(s) left untouched -- see above", file=sys.stderr)
-        return 1
-    return 0
-
-
-if __name__ == "__main__":
-    sys.exit(main())
diff --git a/gradle.properties b/gradle.properties
index 2aadde5..6bc14d4 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -14,15 +14,15 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-platformVersion=2026.2
+platformVersion=2026.2.2
 platformJavaVersion=25
-pluginSinceBuild=262
-version=262.0.1
+pluginSinceBuild=262.10315.125
+version=262.1.0
 
 kotlin.stdlib.default.dependency=false
 
 # Build-hygiene tool versions
-jacocoVersion=0.8.14
+jacocoVersion=0.8.15
 
 # Gradle config
 org.gradle.configuration-cache=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index b1b8ef5..eddabd2 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a9db115..ad7845b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
 networkTimeout=10000
 retries=0
 retryBackOffMs=500
diff --git a/plugin/build.gradle b/plugin/build.gradle
index 0025db5..40e39e2 100644
--- a/plugin/build.gradle
+++ b/plugin/build.gradle
@@ -31,7 +31,7 @@ dependencies {
         bundledPlugin 'com.intellij.javaee.el' // no longer transitive in 2026.2
         bundledPlugin 'com.intellij.persistence'
         bundledPlugin 'com.intellij.javaee.jpa'
-        bundledPlugin 'com.intellij.jsp'
+        plugin 'com.intellij.jsp:262.10315.69' // JSP implementation is no longer bundled in 2026.2.2
         bundledPlugin 'com.intellij.javaee.web'
         bundledPlugin 'org.intellij.groovy'
         bundledPlugin 'com.intellij.database'
@@ -70,6 +70,7 @@ dependencies {
     testImplementation project(':libs-testFramework')
     testCompileOnly project(':pluginModules-i18n')
     testCompileOnly project(':pluginModules-copyright')
+    testCompileOnly project(':pluginModules-maven')
 
     implementation project(':libs-gradle-tooling')
     implementation project(':libs-grails-rt')
diff --git a/plugin/src/main/gen/org/jetbrains/plugins/grails/GroovyMvcIcons.java b/plugin/src/main/gen/org/jetbrains/plugins/grails/GroovyMvcIcons.java
index 231da0d..a91d2e9 100644
--- a/plugin/src/main/gen/org/jetbrains/plugins/grails/GroovyMvcIcons.java
+++ b/plugin/src/main/gen/org/jetbrains/plugins/grails/GroovyMvcIcons.java
@@ -18,7 +18,7 @@
  */
 package org.apache.grails.intellij.plugin;
 
-import com.intellij.ui.IconManager;
+import com.intellij.openapi.util.IconLoader;
 import org.jetbrains.annotations.NotNull;
 
 import javax.swing.*;
@@ -28,16 +28,16 @@ import javax.swing.*;
  * DO NOT EDIT IT BY HAND, run "Generate icon classes" configuration instead
  */
 public final class GroovyMvcIcons {
-  private static @NotNull Icon load(@NotNull String path, int cacheKey, int flags) {
-    return IconManager.getInstance().loadRasterizedIcon(path, GroovyMvcIcons.class.getClassLoader(), cacheKey, flags);
+  private static @NotNull Icon load(@NotNull String path) {
+    return IconLoader.getIcon(path, GroovyMvcIcons.class.getClassLoader());
   }
-  /** 16x16 */ public static final @NotNull Icon Action_method = load("icons/action_method.svg", 1289043343, 0);
-  /** 16x16 */ public static final @NotNull Icon Grails = load("icons/grails.svg", -1483802237, 0);
-  /** 13x13 */ public static final @NotNull Icon Grails_13 = load("icons/grails_13.svg", 1191246384, 2);
-  /** 16x16 */ public static final @NotNull Icon Grails_app = load("icons/grails_app.svg", 1928800982, 0);
-  /** 16x16 */ public static final @NotNull Icon Grails_sdk = load("icons/grails_sdk.svg", 2018310341, 0);
-  /** 16x16 */ public static final @NotNull Icon Grails_test = load("icons/grails_test.svg", 20123500, 0);
-  /** 16x16 */ public static final @NotNull Icon Groovy_mvc_plugin = load("icons/groovy_mvc_plugin.svg", -1041397689, 0);
-  /** 16x16 */ public static final @NotNull Icon Gsp_logo = load("icons/gsp_logo.svg", 1092319254, 0);
-  /** 16x16 */ public static final @NotNull Icon Taglib = load("icons/taglib.svg", 528989771, 0);
+  /** 16x16 */ public static final @NotNull Icon Action_method = load("icons/action_method.svg");
+  /** 16x16 */ public static final @NotNull Icon Grails = load("icons/grails.svg");
+  /** 13x13 */ public static final @NotNull Icon Grails_13 = load("icons/grails_13.svg");
+  /** 16x16 */ public static final @NotNull Icon Grails_app = load("icons/grails_app.svg");
+  /** 16x16 */ public static final @NotNull Icon Grails_sdk = load("icons/grails_sdk.svg");
+  /** 16x16 */ public static final @NotNull Icon Grails_test = load("icons/grails_test.svg");
+  /** 16x16 */ public static final @NotNull Icon Groovy_mvc_plugin = load("icons/groovy_mvc_plugin.svg");
+  /** 16x16 */ public static final @NotNull Icon Gsp_logo = load("icons/gsp_logo.svg");
+  /** 16x16 */ public static final @NotNull Icon Taglib = load("icons/taglib.svg");
 }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProvider.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProvider.java
index 02a4c9e..1a07268 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProvider.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProvider.java
@@ -29,14 +29,17 @@ import com.intellij.openapi.roots.libraries.Library;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.JarFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.platform.backend.workspace.WorkspaceModel;
+import com.intellij.platform.workspace.jps.entities.LibraryEntity;
 import com.intellij.psi.PsiFile;
 import com.intellij.util.ArrayUtil;
-import com.intellij.util.concurrency.ThreadingAssertions;
+import com.intellij.workspaceModel.ide.legacyBridge.LibraryBridgesKt;
 import org.jetbrains.annotations.NotNull;
 import org.apache.grails.intellij.plugin.config.GrailsConfigUtils;
 
 import java.io.IOException;
 import java.util.Collection;
+import java.util.HashSet;
 import java.util.List;
 
 final class GrailsAttachSourcesProvider extends AbstractAttachSourceProvider {
@@ -44,12 +47,24 @@ final class GrailsAttachSourcesProvider extends AbstractAttachSourceProvider {
   private static final Logger LOG = Logger.getInstance(GrailsAttachSourcesProvider.class);
 
   @Override
+  @Deprecated
   public @NotNull Collection<? extends AttachSourcesAction> getActions(@NotNull List<? extends LibraryOrderEntry> orderEntries,
                                                                        @NotNull PsiFile psiFile) {
+    // Still abstract in the platform API; notifications use getLibrariesActions instead.
+    return List.of();
+  }
+
+  @Override
+  public @NotNull Collection<? extends AttachSourcesAction> getLibrariesActions(@NotNull Collection<LibraryEntity> libraryEntities,
+                                                                               @NotNull PsiFile psiFile) {
     VirtualFile jar = getJarByPsiFile(psiFile);
     if (jar == null) return List.of();
 
-    final Library library = getLibraryFromOrderEntriesList(orderEntries);
+    var libraries = new HashSet<>(libraryEntities);
+    if (libraries.size() != 1) return List.of();
+
+    final Library library = LibraryBridgesKt.findLibraryBridge(libraries.iterator().next(),
+      WorkspaceModel.getInstance(psiFile.getProject()).getCurrentSnapshot());
     if (library == null) return List.of();
 
     VirtualFile[] files = library.getFiles(OrderRootType.CLASSES);
@@ -77,18 +92,13 @@ final class GrailsAttachSourcesProvider extends AbstractAttachSourceProvider {
 
     final String sourceFileName = jarNameWithoutExt + "-sources.jar";
 
-    ThreadingAssertions.assertEventDispatchThread();
-
-    grailsHome.refresh(false, false);
-
+    // Discovery runs in a background read action; use the VFS without synchronous refresh.
     final VirtualFile grailsHomeSrc = grailsHome.findChild("src");
     if (grailsHomeSrc == null) {
       LOG.warn("Grails home don't contains 'scr' folder");
       return List.of();
     }
 
-    grailsHomeSrc.refresh(false, false);
-
     VirtualFile srcFile = grailsHomeSrc.findChild(sourceFileName);
     if (srcFile != null) {
       // File already downloaded.
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsConsoleFilterProvider.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsConsoleFilterProvider.java
index 6d82bb5..4b74208 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsConsoleFilterProvider.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/GrailsConsoleFilterProvider.java
@@ -51,7 +51,7 @@ public final class GrailsConsoleFilterProvider extends DefaultConsoleFiltersProv
 
   @Override
   public Filter @NotNull [] getDefaultFilters(@NotNull Project project, @NotNull GlobalSearchScope scope) {
-    return ReadAction.compute(() -> {
+    return ReadAction.computeBlocking(() -> {
       if (!GrailsApplicationManager.getInstance(project).hasApplications()) {
         return Filter.EMPTY_ARRAY;
       }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGrailsXXXAction.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGrailsXXXAction.java
index c55a65f..935fbc3 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGrailsXXXAction.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGrailsXXXAction.java
@@ -20,7 +20,6 @@
 package org.apache.grails.intellij.plugin.actions;
 
 import com.intellij.ide.IdeView;
-import com.intellij.ide.actions.WeighingNewActionGroup;
 import com.intellij.openapi.actionSystem.ActionUpdateThread;
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.AnActionEvent;
@@ -201,7 +200,6 @@ public abstract class NewGrailsXXXAction extends AnAction implements DumbAware {
     if (enabled && !e.isFromActionToolbar()) {
       presentation.setText(GrailsBundle.messagePointer(myPopupTextKey));
     }
-    presentation.putClientProperty(WeighingNewActionGroup.WEIGHT_KEY, WeighingNewActionGroup.HIGHER_WEIGHT);
   }
 
   @Override
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGspAction.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGspAction.java
index 4ac0cf8..0e5b9b2 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGspAction.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/actions/NewGspAction.java
@@ -20,11 +20,9 @@
 package org.apache.grails.intellij.plugin.actions;
 
 import com.intellij.ide.IdeView;
-import com.intellij.ide.actions.WeighingNewActionGroup;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.actionSystem.DataContext;
 import com.intellij.openapi.actionSystem.LangDataKeys;
-import com.intellij.openapi.actionSystem.Presentation;
 import com.intellij.openapi.util.NlsContexts.DialogMessage;
 import com.intellij.openapi.util.NlsContexts.DialogTitle;
 import com.intellij.openapi.util.text.StringUtil;
@@ -62,25 +60,6 @@ public class NewGspAction extends NewGroovyActionBase {
     return super.isAvailable(dataContext) && isInWebAppOrGrailsViewsDirectory(dataContext);
   }
 
-  @Override
-  public void update(final @NotNull AnActionEvent e) {
-    final Presentation presentation = e.getPresentation();
-
-    super.update(e);
-
-    if (presentation.isEnabled()) {
-      final IdeView view = e.getData(LangDataKeys.IDE_VIEW);
-      if (view != null) {
-        for (PsiDirectory dir : view.getDirectories()) {
-          if (GrailsUtils.isUnderGrailsViewsDirectory(dir)) {
-            presentation.putClientProperty(WeighingNewActionGroup.WEIGHT_KEY, WeighingNewActionGroup.HIGHER_WEIGHT);
-            return;
-          }
-        }
-      }
-    }
-  }
-
   private static boolean isInWebAppOrGrailsViewsDirectory(final DataContext dataContext) {
     final IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);
     if (view == null) {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/addins/js/JavaScriptIntegrationUtil.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/addins/js/JavaScriptIntegrationUtil.java
index 3e2f3bc..ddece2b 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/addins/js/JavaScriptIntegrationUtil.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/addins/js/JavaScriptIntegrationUtil.java
@@ -41,7 +41,7 @@ public final class JavaScriptIntegrationUtil {
   private static final AtomicLong ourInjectionTagEpModCount = new AtomicLong();
 
   static {
-    GspJsInjectionTagBean.EP_NAME.addChangeListener(ourInjectionTagEpModCount::incrementAndGet, null);
+    GspJsInjectionTagBean.EP_NAME.getPoint().addChangeListener(ourInjectionTagEpModCount::incrementAndGet, null);
   }
 
   private JavaScriptIntegrationUtil() {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GradleSettingsFile.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GradleSettingsFile.java
new file mode 100644
index 0000000..070a39b
--- /dev/null
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GradleSettingsFile.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.grails.intellij.plugin.config;
+
+import com.intellij.openapi.util.io.FileUtil;
+import com.intellij.openapi.vfs.LocalFileSystem;
+import com.intellij.openapi.vfs.VfsUtil;
+import com.intellij.openapi.vfs.VfsUtilCore;
+import com.intellij.openapi.vfs.VirtualFile;
+import org.jetbrains.annotations.NotNull;
+
+import java.io.IOException;
+import java.nio.file.Path;
+
+/**
+ * Writes the {@code settings.gradle} a freshly created Grails module needs, the way the Gradle
+ * plugin's module builder does for its own modules, minus the platform-internal API.
+ * <p>
+ * A missing settings file gets {@code rootProject.name}, plus an {@code include} when the module
+ * does not sit at the Gradle root. An existing settings file is left alone except for that
+ * {@code include}, which is appended once: {@code grails create-app} may already have written the
+ * file, and a second {@code rootProject.name} would only override the first.
+ */
+final class GradleSettingsFile {
+
+  static final String GROOVY_NAME = "settings.gradle";
+  static final String KOTLIN_NAME = "settings.gradle.kts";
+
+  private GradleSettingsFile() {
+  }
+
+  /**
+   * @param rootProjectPath the Gradle root project directory
+   * @param moduleRoot      the module's content root, equal to or below {@code rootProjectPath}
+   * @param projectName     the value for {@code rootProject.name} when the file is created
+   * @param moduleName      the Gradle project name of the module
+   */
+  static void setUp(@NotNull Path rootProjectPath, @NotNull Path moduleRoot, @NotNull String projectName, @NotNull String moduleName)
+    throws IOException {
+    final VirtualFile rootDir = LocalFileSystem.getInstance().refreshAndFindFileByNioFile(rootProjectPath);
+    if (rootDir == null || !rootDir.isDirectory()) {
+      throw new IOException("Gradle root project directory not found: " + rootProjectPath);
+    }
+
+    final Path relative = rootProjectPath.toAbsolutePath().normalize().relativize(moduleRoot.toAbsolutePath().normalize());
+    final String moduleDir = FileUtil.toSystemIndependentName(relative.toString());
+    final boolean moduleIsRoot = moduleDir.isEmpty();
+
+    VirtualFile settings = rootDir.findChild(KOTLIN_NAME);
+    if (settings == null) settings = rootDir.findChild(GROOVY_NAME);
+
+    if (settings == null) {
+      final StringBuilder text = new StringBuilder();
+      text.append(rootProjectNameLine(projectName, false)).append('\n');
+      if (!moduleIsRoot) {
+        text.append(includeLines(moduleName, moduleDir, false));
+      }
+      settings = rootDir.createChildData(GradleSettingsFile.class, GROOVY_NAME);
+      VfsUtil.saveText(settings, text.toString());
+      return;
+    }
+
+    if (moduleIsRoot) return; // the existing file already describes this project
+
+    final boolean kotlinDsl = KOTLIN_NAME.equals(settings.getName());
+    final String existing = VfsUtilCore.loadText(settings);
+    if (existing.contains("'" + moduleName + "'") || existing.contains("\"" + moduleName + "\"")) return; // already included
+
+    final StringBuilder text = new StringBuilder(existing);
+    if (!existing.isEmpty() && !existing.endsWith("\n")) text.append('\n');
+    text.append(includeLines(moduleName, moduleDir, kotlinDsl));
+    VfsUtil.saveText(settings, text.toString());
+  }
+
+  private static @NotNull String rootProjectNameLine(@NotNull String projectName, boolean kotlinDsl) {
+    return "rootProject.name = " + quote(projectName, kotlinDsl);
+  }
+
+  private static @NotNull String includeLines(@NotNull String moduleName, @NotNull String moduleDir, boolean kotlinDsl) {
+    final StringBuilder lines = new StringBuilder();
+    lines.append(kotlinDsl ? "include(" + quote(moduleName, true) + ")" : "include " + quote(moduleName, false)).append('\n');
+    if (!moduleDir.equals(moduleName)) {
+      lines.append("project(").append(quote(':' + moduleName, kotlinDsl)).append(").projectDir = file(")
+        .append(quote(moduleDir, kotlinDsl)).append(")\n");
+    }
+    return lines.toString();
+  }
+
+  private static @NotNull String quote(@NotNull String value, boolean kotlinDsl) {
+    return kotlinDsl ? '"' + value + '"' : "'" + value + "'";
+  }
+}
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsGradleAwareModuleBuilder.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsGradleAwareModuleBuilder.java
index ccb06fd..80a4818 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsGradleAwareModuleBuilder.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsGradleAwareModuleBuilder.java
@@ -36,13 +36,13 @@ import com.intellij.openapi.roots.ModuleRootManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
-import org.jetbrains.plugins.gradle.service.project.wizard.AbstractGradleModuleBuilder;
 import org.jetbrains.plugins.gradle.settings.DistributionType;
 import org.jetbrains.plugins.gradle.settings.GradleProjectSettings;
 import org.jetbrains.plugins.gradle.util.GradleConstants;
 import org.apache.grails.intellij.plugin.GrailsBundle;
 import org.apache.grails.intellij.plugin.runner.GrailsConsole;
 
+import java.io.IOException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
@@ -105,10 +105,10 @@ public abstract class GrailsGradleAwareModuleBuilder extends ModuleBuilder {
     boolean fresh = myIsCreatingNewProject || myParentProject == null;
     ApplicationManager.getApplication().runWriteAction(() -> {
       try {
-        AbstractGradleModuleBuilder.setupGradleSettingsFile(rootProjectPath, root, project.getName(), module.getName(), fresh, false);
+        GradleSettingsFile.setUp(rootProjectPath, root.toNioPath(), project.getName(), module.getName());
         LOG.debug("'settings.gradle' file set up for module: " + module);
       }
-      catch (ConfigurationException e) {
+      catch (IOException e) {
         LOG.debug(e);
         GrailsConsole.NOTIFICATION_GROUP
           .createNotification(GrailsBundle.message("failed.to.create.settings.gradle.notification.title"),
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsModuleBuilder.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsModuleBuilder.java
index 05ddfeb..33b888a 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsModuleBuilder.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/config/GrailsModuleBuilder.java
@@ -19,7 +19,6 @@
 
 package org.apache.grails.intellij.plugin.config;
 
-import com.intellij.execution.ExecutionBundle;
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.configurations.GeneralCommandLine;
 import com.intellij.execution.configurations.JavaParameters;
@@ -33,15 +32,16 @@ import com.intellij.openapi.module.JavaModuleType;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleType;
 import com.intellij.openapi.options.ConfigurationException;
+import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.projectRoots.JavaSdkType;
 import com.intellij.openapi.projectRoots.Sdk;
 import com.intellij.openapi.projectRoots.SdkTypeId;
 import com.intellij.openapi.roots.ModifiableRootModel;
 import com.intellij.openapi.roots.ProjectRootManager;
-import com.intellij.openapi.startup.StartupManager;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.io.FileUtil;
+import com.intellij.openapi.util.io.NioFiles;
 import com.intellij.openapi.util.registry.Registry;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.LocalFileSystem;
@@ -103,7 +103,7 @@ public final class GrailsModuleBuilder extends GrailsGradleAwareModuleBuilder {
   protected void setupModule(final @NotNull Module module) throws ConfigurationException {
     super.setupModule(module);
     final Project project = module.getProject();
-    StartupManager.getInstance(project).runWhenProjectIsInitialized(() -> {
+    DumbService.getInstance(project).runWhenSmart(() -> {
       try {
         if (module.isDisposed()) return;
         GrailsConsole.getInstance(project);
@@ -187,7 +187,7 @@ public final class GrailsModuleBuilder extends GrailsGradleAwareModuleBuilder {
     final Runnable onDone = () -> {
       try {
         FileUtil.copyDirContent(parameters.second.toFile(), rootModuleContent.toNioPath().toFile());
-        FileUtil.delete(parameters.second);
+        NioFiles.deleteRecursively(parameters.second);
 
         LocalFileSystem.getInstance().refresh(true);
       }
@@ -218,7 +218,7 @@ public final class GrailsModuleBuilder extends GrailsGradleAwareModuleBuilder {
     if (myOptions != null) ContainerUtil.addAll(command.getArgs(), myOptions.split(" "));
 
     final Sdk sdk = getModuleJdk() == null ? ProjectRootManager.getInstance(project).getProjectSdk() : getModuleJdk();
-    if (sdk == null) throw new ExecutionException(ExecutionBundle.message("no.jdk.for.module.error.message", module.getName()));
+    if (sdk == null) throw new ExecutionException(GrailsBundle.message("dialog.message.no.jdk.for.module", module.getName()));
 
     final JavaParameters params = getExecutor().createJavaParameters(sdk, myGrailsSDK, command);
     params.setWorkingDirectory(directory.toFile().getAbsolutePath());
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/GrailsEditorToolbar.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/GrailsEditorToolbar.java
index a3e1985..3d79c2a 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/GrailsEditorToolbar.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/GrailsEditorToolbar.java
@@ -18,10 +18,11 @@
  */
 package org.apache.grails.intellij.plugin.editor;
 
-import com.intellij.diagnostic.LoadingState;
 import com.intellij.ide.actions.DistractionFreeModeController;
 import com.intellij.ide.ui.UISettings;
 import com.intellij.ide.util.PropertiesComponent;
+import com.intellij.openapi.application.Application;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.fileEditor.FileEditor;
 import com.intellij.openapi.fileEditor.TextEditor;
 import com.intellij.openapi.project.Project;
@@ -61,12 +62,16 @@ public final class GrailsEditorToolbar {
 
   /**
    * Mirrors what {@code propComponentProperty} did for the Kotlin {@code var} this replaces: read
-   * from the application-level {@link PropertiesComponent}, fall back to the default before
-   * components are loaded, and store nothing when the value equals the default.
+   * from the application-level {@link PropertiesComponent}, fall back to the default while the
+   * application or its services are not available yet, and store nothing when the value equals
+   * the default.
    */
   public static boolean isShowEditorToolbar() {
-    if (!LoadingState.COMPONENTS_LOADED.isOccurred()) return SHOW_TOOLBAR_DEFAULT;
-    return PropertiesComponent.getInstance().getBoolean(SHOW_TOOLBAR_PROPERTY, SHOW_TOOLBAR_DEFAULT);
+    Application application = ApplicationManager.getApplication();
+    if (application == null || application.isDisposed()) return SHOW_TOOLBAR_DEFAULT;
+    PropertiesComponent properties = application.getService(PropertiesComponent.class);
+    if (properties == null) return SHOW_TOOLBAR_DEFAULT;
+    return properties.getBoolean(SHOW_TOOLBAR_PROPERTY, SHOW_TOOLBAR_DEFAULT);
   }
 
   public static void setShowEditorToolbar(boolean value) {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/toolbar/GrailsToolbarActionBase.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/toolbar/GrailsToolbarActionBase.java
index 84020e9..b53b963 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/toolbar/GrailsToolbarActionBase.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/editor/toolbar/GrailsToolbarActionBase.java
@@ -23,6 +23,7 @@ import com.intellij.openapi.actionSystem.ActionUpdateThread;
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.actionSystem.Separator;
+import com.intellij.openapi.actionSystem.ex.ActionUtil;
 import com.intellij.openapi.util.NlsActions.ActionText;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -41,14 +42,14 @@ public abstract class GrailsToolbarActionBase extends ActionGroup {
     return ActionUpdateThread.BGT;
   }
 
-  @Override
-  public boolean displayTextInToolbar() {
-    return true;
+  protected GrailsToolbarActionBase() {
+    getTemplatePresentation().putClientProperty(ActionUtil.SHOW_TEXT_IN_TOOLBAR, true);
   }
 
   @Override
   public void update(@NotNull AnActionEvent e) {
     ArtefactData data = GrailsActionUtil.getArtefactData(e.getDataContext());
+    e.getPresentation().putClientProperty(ActionUtil.SHOW_TEXT_IN_TOOLBAR, true);
     e.getPresentation().setText(data == null ? getTemplateText() : getTitle(data));
     e.getPresentation().setPerformGroup(isOpenSingle() && data != null && createNavigateActions(data).size() == 1);
     e.getPresentation().setPopupGroup(true);
@@ -61,7 +62,7 @@ public abstract class GrailsToolbarActionBase extends ActionGroup {
     if (data == null) return;
     Collection<AnAction> actions = createNavigateActions(data);
     if (actions.size() == 1) {
-      actions.iterator().next().actionPerformed(e);
+      ActionUtil.performAction(actions.iterator().next(), e);
     }
   }
 
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/fileType/GspFileType.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/fileType/GspFileType.java
index d5ba56e..1d862b0 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/fileType/GspFileType.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/fileType/GspFileType.java
@@ -24,7 +24,6 @@ import com.intellij.lang.LanguageParserDefinitions;
 import com.intellij.lang.ParserDefinition;
 import com.intellij.lexer.Lexer;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.vfs.CharsetToolkit;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.tree.IElementType;
 import com.intellij.ultimate.PluginVerifier;
@@ -38,6 +37,8 @@ import org.apache.grails.intellij.plugin.lang.gsp.lexer.core.GspTokenTypes;
 import org.apache.grails.intellij.plugin.lang.gsp.psi.gsp.impl.directive.GspDirectiveAttributeValueImpl;
 import org.jetbrains.plugins.groovy.GroovyEnabledFileType;
 
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.UnsupportedCharsetException;
 import javax.swing.Icon;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
@@ -77,15 +78,10 @@ public final class GspFileType extends XmlLikeFileType implements GroovyEnabledF
     return "GSP";
   }
 
-  @Override
-  public boolean isJVMDebuggingSupported() {
-    return true;
-  }
-
   @Override
   public Charset extractCharsetFromFileContent(Project project, @Nullable VirtualFile file, @NotNull CharSequence content) {
     String name = XmlUtil.extractXmlEncodingFromProlog(content);
-    Charset charset = CharsetToolkit.forName(name);
+    Charset charset = charsetForName(name);
     if (charset != null) return charset;
 
     charset = extractCharset(content);
@@ -94,6 +90,17 @@ public final class GspFileType extends XmlLikeFileType implements GroovyEnabledF
     return StandardCharsets.UTF_8;
   }
 
+  /** {@code Charset.forName} that answers {@code null} for a missing, malformed or unsupported name. */
+  static @Nullable Charset charsetForName(@Nullable String name) {
+    if (name == null) return null;
+    try {
+      return Charset.forName(name);
+    }
+    catch (IllegalCharsetNameException | UnsupportedCharsetException ignored) {
+      return null;
+    }
+  }
+
   private static @Nullable Charset extractCharset(@NotNull CharSequence content) {
     final ParserDefinition definition = LanguageParserDefinitions.INSTANCE.forLanguage(GspLanguage.INSTANCE);
     if (definition == null) return null;
@@ -107,7 +114,7 @@ public final class GspFileType extends XmlLikeFileType implements GroovyEnabledF
         Matcher matcher = GspDirectiveAttributeValueImpl.CHARSET_PATTERN.matcher(lexer.getTokenSequence());
         if (matcher.find()) {
           String name = matcher.group(1);
-          Charset charset = CharsetToolkit.forName(name);
+          Charset charset = charsetForName(name);
           if (charset != null) {
             return charset;
           }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/gson/GsonModelFieldArgumentDescriptor.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/gson/GsonModelFieldArgumentDescriptor.java
index c9ff40d..4dfed65 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/gson/GsonModelFieldArgumentDescriptor.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/gson/GsonModelFieldArgumentDescriptor.java
@@ -25,7 +25,9 @@ import org.jetbrains.plugins.groovy.extensions.impl.NamedArgumentDescriptorBase;
 import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement;
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrField;
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.arguments.GrArgumentLabel;
+import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.ConversionResult;
 import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.TypesUtil;
+import org.jetbrains.plugins.groovy.lang.psi.typeEnhancers.GrTypeConverter;
 
 public final class GsonModelFieldArgumentDescriptor extends NamedArgumentDescriptorBase {
 
@@ -46,7 +48,7 @@ public final class GsonModelFieldArgumentDescriptor extends NamedArgumentDescrip
 
   @Override
   public boolean checkType(@NotNull PsiType type, @NotNull GroovyPsiElement context) {
-    return TypesUtil.isAssignable(myField.getType(), type, context);
+    return TypesUtil.canAssign(myField.getType(), type, context, GrTypeConverter.Position.ASSIGNMENT) == ConversionResult.OK;
   }
 
   @Override
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspJavaDebugAware.java
similarity index 51%
copy from plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java
copy to plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspJavaDebugAware.java
index 031515b..7a41192 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspJavaDebugAware.java
@@ -17,28 +17,22 @@
  * under the License.
  */
 
-package org.apache.grails.intellij.plugin.service;
+package org.apache.grails.intellij.plugin.lang.gsp.debug;
 
-import com.intellij.openapi.components.Service;
-import com.intellij.openapi.progress.BackgroundTaskQueue;
-import com.intellij.openapi.progress.Task;
-import com.intellij.openapi.project.Project;
+import com.intellij.debugger.engine.JavaDebugAware;
+import com.intellij.psi.PsiFile;
 import org.jetbrains.annotations.NotNull;
-import org.apache.grails.intellij.plugin.GrailsBundle;
+import org.apache.grails.intellij.plugin.fileType.GspFileType;
 
-@Service(Service.Level.PROJECT)
-public final class GrailsBackgroundService {
-  private final BackgroundTaskQueue myQueue;
-
-  public GrailsBackgroundService(Project project) {
-    myQueue = new BackgroundTaskQueue(project, GrailsBundle.message("task.queue.title.grails.background.tasks"));
-  }
-
-  public void run(Task.Backgroundable task) {
-    myQueue.run(task);
-  }
-
-  public static @NotNull GrailsBackgroundService getInstance(@NotNull Project project) {
-    return project.getService(GrailsBackgroundService.class);
+/**
+ * Lets the Java debugger put line breakpoints in GSP files. Replaces the deprecated
+ * {@code LanguageFileType.isJVMDebuggingSupported} override on {@link GspFileType}; the positions
+ * themselves are mapped by {@link GspPositionManager}.
+ */
+public final class GspJavaDebugAware extends JavaDebugAware {
+  @Override
+  public boolean isBreakpointAware(@NotNull PsiFile psiFile) {
+    // The view provider's type covers every root of a GSP file, not just the GSP one.
+    return psiFile.getViewProvider().getFileType() == GspFileType.GSP_FILE_TYPE;
   }
 }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspPositionManager.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspPositionManager.java
index 5dc3782..1a2959b 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspPositionManager.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/debug/GspPositionManager.java
@@ -62,7 +62,7 @@ public class GspPositionManager implements PositionManager {
 
     String path
 
-    = ReadAction.compute(()->{
+    = ReadAction.computeBlocking(()->{
       VirtualFile virtualFile = file.getOriginalFile().getVirtualFile();
       if (virtualFile == null) return null;
       return virtualFile.getPath();
@@ -180,7 +180,7 @@ public class GspPositionManager implements PositionManager {
   }
 
   @Override
-  public @NotNull Set<? extends FileType> getAcceptedFileTypes() {
-    return ourFileTypes;
+  public boolean isAcceptedFileType(@NotNull FileType fileType) {
+    return ourFileTypes.contains(fileType);
   }
  }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/GspBlockGenerator.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/GspBlockGenerator.java
index 3e24ba9..94c40df 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/GspBlockGenerator.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/GspBlockGenerator.java
@@ -31,6 +31,7 @@ import com.intellij.formatting.Wrap;
 import com.intellij.lang.ASTNode;
 import com.intellij.lang.Language;
 import com.intellij.lang.LanguageFormatting;
+import com.intellij.lang.injection.InjectedLanguageManager;
 import com.intellij.lang.javascript.JSTokenTypes;
 import com.intellij.lang.javascript.JavaScriptSupportLoader;
 import com.intellij.lang.javascript.JavascriptLanguage;
@@ -46,7 +47,7 @@ import com.intellij.psi.PsiFile;
 import com.intellij.psi.codeStyle.CodeStyleSettings;
 import com.intellij.psi.css.CssStylesheet;
 import com.intellij.psi.formatter.xml.XmlFormattingPolicy;
-import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
+import com.intellij.psi.util.PsiUtilCore;
 import com.intellij.psi.xml.XmlTag;
 import org.jetbrains.annotations.NotNull;
 import org.apache.grails.intellij.plugin.addins.GrailsIntegrationUtil;
@@ -183,7 +184,8 @@ public final class GspBlockGenerator {
   private static void generateBlockForJSInjection(PsiElement outer, List<Block> result, CodeStyleSettings settings) {
     PsiFile file = outer.getContainingFile();
     final int offset = outer.getTextRange().getStartOffset();
-    PsiElement element = InjectedLanguageUtil.findElementAtNoCommit(file, offset);
+    PsiElement element = InjectedLanguageManager.getInstance(file.getProject()).findInjectedElementAt(file, offset);
+    if (element == null) element = file.findElementAt(offset);
     FormattingModelBuilder builder = getJSFormattingModelBuilder(offset, file, outer);
     final FormattingModel childModel = builder.createModel(FormattingContext.create(element, settings));
     Block rootJsBlock = childModel.getRootBlock();
@@ -330,7 +332,8 @@ public final class GspBlockGenerator {
     public @NotNull List<Block> getSubBlocks() {
       if (mySubBlocks == null) {
         SubBlockVisitor visitor = new MyJSSubBlockVisitor(mySettings, myOffset);
-        PsiFile jsFile = InjectedLanguageUtil.findInjectedPsiNoCommit(myFile, myOffset);
+        PsiElement injected = InjectedLanguageManager.getInstance(myFile.getProject()).findInjectedElementAt(myFile, myOffset);
+        PsiFile jsFile = injected == null ? null : PsiUtilCore.getTemplateLanguageFile(injected.getContainingFile());
         if (jsFile != null && jsFile.getNode() != null) {
           visitor.visit(jsFile.getNode());
         }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/settings/GspCodeStyleSettingsProvider.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/settings/GspCodeStyleSettingsProvider.java
index 730e52c..ab3fb40 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/settings/GspCodeStyleSettingsProvider.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/formatter/settings/GspCodeStyleSettingsProvider.java
@@ -22,7 +22,7 @@ package org.apache.grails.intellij.plugin.lang.gsp.formatter.settings;
 import com.intellij.application.options.CodeStyleAbstractConfigurable;
 import com.intellij.application.options.CodeStyleAbstractPanel;
 import com.intellij.application.options.TabbedLanguageCodeStylePanel;
-import com.intellij.openapi.options.Configurable;
+import com.intellij.psi.codeStyle.CodeStyleConfigurable;
 import com.intellij.psi.codeStyle.CodeStyleSettings;
 import com.intellij.psi.codeStyle.CodeStyleSettingsProvider;
 import org.jetbrains.annotations.NotNull;
@@ -34,7 +34,7 @@ import org.apache.grails.intellij.plugin.lang.gsp.GspLanguage;
  */
 public final class GspCodeStyleSettingsProvider extends CodeStyleSettingsProvider {
   @Override
-  public @NotNull Configurable createSettingsPage(@NotNull CodeStyleSettings settings, @NotNull CodeStyleSettings originalSettings) {
+  public @NotNull CodeStyleConfigurable createConfigurable(@NotNull CodeStyleSettings settings, @NotNull CodeStyleSettings originalSettings) {
     return new CodeStyleAbstractConfigurable(settings, originalSettings, GrailsBundle.message("language.gsp")) {
 
       @Override
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/highlighter/GspIndexPatternBuilder.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/highlighter/GspIndexPatternBuilder.java
index f0f2036..625c500 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/highlighter/GspIndexPatternBuilder.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/highlighter/GspIndexPatternBuilder.java
@@ -20,12 +20,9 @@
 package org.apache.grails.intellij.plugin.lang.gsp.highlighter;
 
 import com.intellij.lexer.Lexer;
-import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.highlighter.EditorHighlighter;
 import com.intellij.openapi.editor.highlighter.EditorHighlighterFactory;
-import com.intellij.openapi.editor.impl.EditorHighlighterCache;
 import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.PsiDocumentManager;
 import com.intellij.psi.PsiFile;
 import com.intellij.psi.impl.search.IndexPatternBuilder;
 import com.intellij.psi.impl.search.LexerEditorHighlighterLexer;
@@ -42,24 +39,13 @@ public final class GspIndexPatternBuilder implements IndexPatternBuilder {
   @Override
   public Lexer getIndexingLexer(@NotNull PsiFile file) {
     if (file instanceof GspFile) {
-      EditorHighlighter highlighter;
+      VirtualFile virtualFile = file.getVirtualFile();
+      if (virtualFile == null) return null;
 
-      final Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file);
-      EditorHighlighter cachedEditorHighlighter;
-      boolean alreadyInitializedHighlighter = false;
-
-      if ((cachedEditorHighlighter = EditorHighlighterCache.getEditorHighlighterForCachesBuilding(document)) != null &&
-          EditorHighlighterCache.checkCanUseCachedEditorHighlighter(file.getText(), cachedEditorHighlighter)) {
-        highlighter = cachedEditorHighlighter;
-        alreadyInitializedHighlighter = true;
-      } else {
-        VirtualFile virtualFile = file.getVirtualFile();
-        if (virtualFile == null) return null;
-
-        highlighter = EditorHighlighterFactory.getInstance().createEditorHighlighter(file.getProject(), virtualFile);
-      }
-
-      return new LexerEditorHighlighterLexer(highlighter, alreadyInitializedHighlighter);
+      // The layered GSP highlighter, not the bare GSP lexer: a TODO inside an embedded Groovy or
+      // JavaScript comment is only a comment token once the layers have run.
+      EditorHighlighter highlighter = EditorHighlighterFactory.getInstance().createEditorHighlighter(file.getProject(), virtualFile);
+      return new LexerEditorHighlighterLexer(highlighter, false);
     }
     return null;
   }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/GspPsiElementFactoryImpl.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/GspPsiElementFactoryImpl.java
index 200a6b3..1ea3bc9 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/GspPsiElementFactoryImpl.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/GspPsiElementFactoryImpl.java
@@ -62,7 +62,7 @@ public final class GspPsiElementFactoryImpl extends GspPsiElementFactory {
   }
 
   private GspFile createDummyFile(String s) {
-    return (GspFile) PsiFileFactory.getInstance(myProject).createFileFromText("DUMMY__." + GspFileType.GSP_FILE_TYPE.getDefaultExtension(), s);
+    return (GspFile) PsiFileFactory.getInstance(myProject).createFileFromText("DUMMY__." + GspFileType.GSP_FILE_TYPE.getDefaultExtension(), GspFileType.GSP_FILE_TYPE, s);
   }
 
   @Override
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/GspFileImpl.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/GspFileImpl.java
index ad42fd0..7cf9fc5 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/GspFileImpl.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/GspFileImpl.java
@@ -23,10 +23,8 @@ import com.intellij.ide.highlighter.JavaFileType;
 import com.intellij.lang.ASTNode;
 import com.intellij.lang.html.HTMLLanguage;
 import com.intellij.lang.injection.InjectedLanguageManager;
-import com.intellij.lang.javascript.psi.JSElement;
 import com.intellij.lang.javascript.psi.JSFile;
 import com.intellij.lang.javascript.psi.ecmal4.XmlBackedJSClass;
-import com.intellij.lang.javascript.psi.resolve.JSResolveUtil;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.FileTypeRegistry;
 import com.intellij.openapi.module.Module;
@@ -249,7 +247,7 @@ public class GspFileImpl extends PsiFileImpl implements GspFile {
 
           if (injected != null && injected != fileOfPlace) {
             ResolveState s = state.put(XmlBackedJSClass.PROCESS_XML_BACKED_CLASS_MEMBERS_HINT, Boolean.TRUE);
-            if (!JSResolveUtil.processDeclarationsInScope((JSElement)injected, processor, s, null, place)) return false;
+            if (!injected.processDeclarations(processor, s, null, place)) return false;
           }
         }
       }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/gtag/GspGrailsTagImpl.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/gtag/GspGrailsTagImpl.java
index 6f307af..352ae36 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/gtag/GspGrailsTagImpl.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/lang/gsp/psi/gsp/impl/gtag/GspGrailsTagImpl.java
@@ -39,6 +39,7 @@ import com.intellij.psi.xml.XmlChildRole;
 import com.intellij.psi.xml.XmlTokenType;
 import com.intellij.util.IncorrectOperationException;
 import com.intellij.xml.XmlExtension;
+import org.apache.grails.intellij.plugin.fileType.GspFileType;
 import org.jetbrains.annotations.NotNull;
 import org.apache.grails.intellij.plugin.lang.gsp.GspFileViewProvider;
 import org.apache.grails.intellij.plugin.lang.gsp.parsing.GspElementTypes;
@@ -104,7 +105,7 @@ public class GspGrailsTagImpl extends XmlTagImpl implements GspGrailsTag {
       protected PsiElement doSetTextToElement(String text) {
         if (!text.matches("[\\w\\-/]+")) return getElement();
 
-        PsiFile gspFile = PsiFileFactory.getInstance(getProject()).createFileFromText("a.gsp", "<tmpl:" + text + "></tmpl:" + text + '>');
+        PsiFile gspFile = PsiFileFactory.getInstance(getProject()).createFileFromText("a.gsp", GspFileType.GSP_FILE_TYPE, "<tmpl:" + text + "></tmpl:" + text + '>');
 
         boolean isStartName = true;
         for (PsiElement e = GspGrailsTagImpl.this.getFirstChild(); e != null; e = e.getNextSibling()) {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureSynchronizer.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureSynchronizer.java
index aa6962c..e9fb843 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureSynchronizer.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureSynchronizer.java
@@ -27,6 +27,7 @@ import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleManager;
 import com.intellij.openapi.module.ModuleUtilCore;
 import com.intellij.openapi.project.DumbAware;
+import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.ModuleListener;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.ModuleRootEvent;
@@ -34,7 +35,6 @@ import com.intellij.openapi.roots.ModuleRootListener;
 import com.intellij.openapi.roots.ProjectFileIndex;
 import com.intellij.openapi.roots.ProjectRootManager;
 import com.intellij.openapi.startup.ProjectActivity;
-import com.intellij.openapi.startup.StartupManager;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.SimpleModificationTracker;
 import com.intellij.openapi.util.Trinity;
@@ -250,7 +250,15 @@ public final class MvcModuleStructureSynchronizer implements Disposable {
     synchronized (myOrders) {
       myOrders.add(Pair.create(on, action));
     }
-    StartupManager.getInstance(myProject).runAfterOpened(this::scheduleRunActions);
+    // Once the project is open the order is scheduled right away, as before. Until then it waits in
+    // myOrders: MyPostStartUpActivity flushes the queue when the project opens, and runWhenSmart
+    // covers an order placed between that flush and the end of startup.
+    if (ApplicationManager.getApplication().isUnitTestMode() || myProject.isInitialized()) {
+      scheduleRunActions();
+    }
+    else {
+      DumbService.getInstance(myProject).runWhenSmart(this::scheduleRunActions);
+    }
   }
 
   private void scheduleRunActions() {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureUtil.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureUtil.java
index db08fed..8771d06 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureUtil.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/MvcModuleStructureUtil.java
@@ -30,6 +30,7 @@ import com.intellij.openapi.module.JavaModuleType;
 import com.intellij.openapi.module.ModifiableModuleModel;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleManager;
+import com.intellij.openapi.module.ModuleUtilCore;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.ContentEntry;
 import com.intellij.openapi.roots.DependencyScope;
@@ -260,7 +261,7 @@ public final class MvcModuleStructureUtil {
     if (!actions.second.isEmpty()) {
       final Application application = ApplicationManager.getApplication();
       final ModifiableFacetModel model =
-        ReadAction.compute(() -> FacetManager.getInstance(module).createModifiableModel());
+        ReadAction.computeBlocking(() -> FacetManager.getInstance(module).createModifiableModel());
       for (Consumer<ModifiableFacetModel> action : actions.second) {
         action.consume(model);
       }
@@ -529,7 +530,7 @@ public final class MvcModuleStructureUtil {
   public static @NotNull Module createAuxiliaryModule(@NotNull Module appModule, final String moduleName, final GrailsFramework framework) {
     ModuleManager moduleManager = ModuleManager.getInstance(appModule.getProject());
     final ModifiableModuleModel moduleModel = moduleManager.getModifiableModel();
-    final String moduleFilePath = new File(appModule.getModuleFilePath()).getParent() + "/" + moduleName + ".iml";
+    final String moduleFilePath = ModuleUtilCore.getModuleDirPath(appModule) + "/" + moduleName + ".iml";
     final VirtualFile existing = LocalFileSystem.getInstance().findFileByPath(moduleFilePath);
     if (existing != null) {
       try {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/InstallUninstallPluginsDialog.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/InstallUninstallPluginsDialog.java
index c6ce77a..794ac79 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/InstallUninstallPluginsDialog.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/InstallUninstallPluginsDialog.java
@@ -49,6 +49,7 @@ import org.apache.grails.intellij.plugin.mvc.MvcCommand;
 import javax.swing.JComboBox;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
+import javax.swing.JList;
 import javax.swing.JPanel;
 import java.awt.BorderLayout;
 import java.awt.Font;
@@ -188,17 +189,24 @@ public class InstallUninstallPluginsDialog extends DialogWrapper {
 
     comboBox.setSelectedItem(mvcPlugin.getLastRelease());
 
-    comboBox.setRenderer(SimpleListCellRenderer.create((label, value, index) -> {
-      if ("zip".equals(value.getType())) {
-        label.setText(GrailsBundle.message("install.uninstall.plugins.dialog.zip.release.version", value.getVersion()));
-      }
-      else if (value == value.getPlugin().getLastRelease()) {
-        label.setText(GrailsBundle.message("install.uninstall.plugins.dialog.latest.version", value.getVersion()));
-      }
-      else {
-        label.setText(value.getVersion());
+    comboBox.setRenderer(new SimpleListCellRenderer<>() {
+      @Override
+      public void customize(@NotNull JList<? extends MvcPluginDescriptor.Release> list,
+                            MvcPluginDescriptor.Release value,
+                            int index,
+                            boolean selected,
+                            boolean hasFocus) {
+        if ("zip".equals(value.getType())) {
+          setText(GrailsBundle.message("install.uninstall.plugins.dialog.zip.release.version", value.getVersion()));
+        }
+        else if (value == value.getPlugin().getLastRelease()) {
+          setText(GrailsBundle.message("install.uninstall.plugins.dialog.latest.version", value.getVersion()));
+        }
+        else {
+          setText(value.getVersion());
+        }
       }
-    }));
+    });
 
     return comboBox;
   }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginUtil.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginUtil.java
index 709eb36..c022a23 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginUtil.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginUtil.java
@@ -31,6 +31,7 @@ import com.intellij.notification.NotificationType;
 import com.intellij.notification.Notifications;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.module.Module;
+import com.intellij.openapi.util.JDOMUtil;
 import com.intellij.openapi.util.Key;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.text.StringUtil;
@@ -38,10 +39,8 @@ import com.intellij.openapi.vcs.FileStatus;
 import com.intellij.openapi.vfs.LocalFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.util.net.ProxyConfiguration;
-import org.jdom.Document;
 import org.jdom.Element;
 import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -278,9 +277,7 @@ public final class MvcPluginUtil {
     try {
       in = file.getInputStream();
 
-      Document document = new SAXBuilder().build(in);
-
-      Element root = document.getRootElement();
+      Element root = JDOMUtil.load(in);
 
       for (Element pluginElement : root.getChildren("plugin")) {
         String name = pluginElement.getAttributeValue("name");
@@ -381,8 +378,7 @@ public final class MvcPluginUtil {
     Element root;
 
     try {
-      Document document = new SAXBuilder().build(inputStream);
-      root = document.getRootElement();
+      root = JDOMUtil.load(inputStream);
     }
     catch (JDOMException e) {
       return null;
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginsMain.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginsMain.java
index f0a252e..b95905f 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginsMain.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/mvc/plugins/MvcPluginsMain.java
@@ -21,7 +21,6 @@ package org.apache.grails.intellij.plugin.mvc.plugins;
 
 import com.intellij.credentialStore.Credentials;
 import com.intellij.ide.BrowserUtil;
-import com.intellij.ide.plugins.PluginManagerMain;
 import com.intellij.ide.ui.search.SearchUtil;
 import com.intellij.ide.ui.search.SearchableOptionsRegistrar;
 import com.intellij.openapi.actionSystem.ActionGroup;
@@ -37,6 +36,7 @@ import com.intellij.openapi.util.NlsSafe;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.openapi.wm.IdeFocusManager;
+import com.intellij.ui.BrowserHyperlinkListener;
 import com.intellij.ui.ClickListener;
 import com.intellij.ui.FilterComponent;
 import com.intellij.ui.GuiUtils;
@@ -121,7 +121,7 @@ public class MvcPluginsMain {
     myApplication = application;
     myDialogBuilder = dialogBuilder;
 
-    myDescriptionTextArea.addHyperlinkListener(new PluginManagerMain.MyHyperlinkListener());
+    myDescriptionTextArea.addHyperlinkListener(BrowserHyperlinkListener.INSTANCE);
 
     main.registerKeyboardAction(new ActionListener() {
       @Override
@@ -421,7 +421,7 @@ public class MvcPluginsMain {
 
     pluginInfoUpdate(mvcPlugin);
 
-    ApplicationManager.getApplication().invokeLater(myActionToolbar::updateActionsImmediately);
+    ApplicationManager.getApplication().invokeLater(myActionToolbar::updateActionsAsync);
   }
 
   public MvcPluginsTable getPluginTable() {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/PerspectiveFileEditorComponent.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/PerspectiveFileEditorComponent.java
index 2b0469a..bbef69f 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/PerspectiveFileEditorComponent.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/PerspectiveFileEditorComponent.java
@@ -110,7 +110,7 @@ public class PerspectiveFileEditorComponent extends JPanel implements UiDataProv
 
   private void update() {
     if (isShowing()) {
-      myBuilder.queueUpdate();
+      myBuilder.queryGraphUpdate().withDataReload().withRelayout().runAsync();
     }
   }
 
@@ -125,7 +125,7 @@ public class PerspectiveFileEditorComponent extends JPanel implements UiDataProv
 
   @Override
   public void reset() {
-    myBuilder.updateGraph();
+    myBuilder.queryGraphUpdate().withDataReload().withRelayout().run();
   }
 
   @Override
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/create/CreateNewRelation.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/create/CreateNewRelation.java
index fdcea84..520a806 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/create/CreateNewRelation.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/perspectives/create/CreateNewRelation.java
@@ -21,6 +21,8 @@ package org.apache.grails.intellij.plugin.perspectives.create;
 
 import com.intellij.CommonBundle;
 import com.intellij.icons.AllIcons;
+import com.intellij.openapi.application.ApplicationManager;
+import com.intellij.openapi.application.ModalityState;
 import com.intellij.openapi.editor.event.DocumentEvent;
 import com.intellij.openapi.editor.event.DocumentListener;
 import com.intellij.openapi.project.Project;
@@ -101,7 +103,9 @@ public class CreateNewRelation extends DialogWrapper {
     myContentPane.registerKeyboardAction(new ActionListener() {
       @Override
       public void actionPerformed(ActionEvent e) {
-        IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(myNameComboBox, true));
+        ApplicationManager.getApplication().invokeLater(
+          () -> IdeFocusManager.getGlobalInstance().requestFocus(myNameComboBox, true),
+          ModalityState.stateForComponent(myNameComboBox));
       }
     }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/plugins/GrailsPlugins.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/plugins/GrailsPlugins.java
index 232212a..8c78dbc 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/plugins/GrailsPlugins.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/plugins/GrailsPlugins.java
@@ -50,7 +50,7 @@ public final class GrailsPlugins {
   static final String PLUGIN_CLASS_SUFFIX = "GrailsPlugin";
 
   public static @NotNull Collection<GrailsPluginDescriptor> computePlugins(@NotNull GrailsApplication application) {
-    return ReadAction.compute(() -> CachedValuesManager.getManager(application.getProject()).getCachedValue(
+    return ReadAction.computeBlocking(() -> CachedValuesManager.getManager(application.getProject()).getCachedValue(
       application,
       () -> {
         List<GrailsPluginDescriptor> all = new ArrayList<>(getSourcePlugins(application));
@@ -60,7 +60,7 @@ public final class GrailsPlugins {
   }
 
   public static @NotNull Collection<Grails3SourcePluginDescriptor> getSourcePlugins(@NotNull GrailsApplication application) {
-    return ReadAction.compute(() -> CachedValuesManager.getManager(application.getProject()).getCachedValue(
+    return ReadAction.computeBlocking(() -> CachedValuesManager.getManager(application.getProject()).getCachedValue(
       application,
       () -> Result.create(doComputeSourcePlugins(application),
                           ProjectRootManager.getInstance(application.getProject()))));
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsFlatPackageNode.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsFlatPackageNode.java
index 1143161..d0d86aa 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsFlatPackageNode.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsFlatPackageNode.java
@@ -19,6 +19,7 @@
 
 package org.apache.grails.intellij.plugin.projectView.nodes;
 
+import com.intellij.icons.AllIcons;
 import com.intellij.ide.projectView.PresentationData;
 import com.intellij.ide.projectView.ViewSettings;
 import com.intellij.ide.util.treeView.TreeViewUtil;
@@ -27,8 +28,6 @@ import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.JavaPsiFacade;
 import com.intellij.psi.PsiPackage;
-import com.intellij.ui.IconManager;
-import com.intellij.ui.PlatformIcons;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Collection;
@@ -50,7 +49,7 @@ class GrailsFlatPackageNode extends GrailsArtefactPackageNode<GrailsPackageValue
 
   @Override
   protected void update(@NotNull PresentationData presentation) {
-    presentation.setIcon(IconManager.getInstance().getPlatformIcon(PlatformIcons.Package));
+    presentation.setIcon(AllIcons.Nodes.Package);
     String presentableText = packageFqn;
     if (getSettings().isAbbreviatePackageNames()) {
       PsiPackage psiPackage = JavaPsiFacade.getInstance(Objects.requireNonNull(getProject())).findPackage(packageFqn);
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsRegularPackageNode.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsRegularPackageNode.java
index 505cb42..f612322 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsRegularPackageNode.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/nodes/GrailsRegularPackageNode.java
@@ -19,6 +19,7 @@
 
 package org.apache.grails.intellij.plugin.projectView.nodes;
 
+import com.intellij.icons.AllIcons;
 import com.intellij.ide.projectView.PresentationData;
 import com.intellij.ide.projectView.ViewSettings;
 import com.intellij.ide.util.treeView.AbstractTreeNode;
@@ -26,8 +27,6 @@ import com.intellij.ide.util.treeView.ValidateableNode;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vfs.VfsUtil;
 import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.ui.IconManager;
-import com.intellij.ui.PlatformIcons;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Collection;
@@ -78,7 +77,7 @@ public class GrailsRegularPackageNode extends GrailsArtefactPackageNode<Compacte
 
   @Override
   protected void update(@NotNull PresentationData presentation) {
-    presentation.setIcon(IconManager.getInstance().getPlatformIcon(PlatformIcons.Package));
+    presentation.setIcon(AllIcons.Nodes.Package);
     presentation.setPresentableText(GrailsNodes.fqnString(getValue().getRelativeParts()));
   }
 
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/references/common/GrailsEncodingReferenceProvider.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/references/common/GrailsEncodingReferenceProvider.java
index 539e5c6..b4a19f8 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/references/common/GrailsEncodingReferenceProvider.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/references/common/GrailsEncodingReferenceProvider.java
@@ -21,7 +21,6 @@ package org.apache.grails.intellij.plugin.references.common;
 
 import com.intellij.codeInsight.lookup.LookupElement;
 import com.intellij.codeInsight.lookup.LookupElementBuilder;
-import com.intellij.openapi.vfs.CharsetToolkit;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiReference;
 import com.intellij.psi.PsiReferenceBase;
@@ -30,6 +29,7 @@ import com.intellij.util.ProcessingContext;
 import org.jetbrains.annotations.NotNull;
 
 import java.nio.charset.Charset;
+import java.util.Collection;
 
 public class GrailsEncodingReferenceProvider extends PsiReferenceProvider {
   @Override
@@ -42,11 +42,12 @@ public class GrailsEncodingReferenceProvider extends PsiReferenceProvider {
 
       @Override
       public Object @NotNull [] getVariants() {
-        Charset[] charsets = CharsetToolkit.getAvailableCharsets();
+        Collection<Charset> charsets = Charset.availableCharsets().values();
 
-        LookupElement[] res = new LookupElement[charsets.length];
-        for (int i = 0; i < charsets.length; i++) {
-          res[i] = LookupElementBuilder.create(charsets[i].name()).withCaseSensitivity(false);
+        LookupElement[] res = new LookupElement[charsets.size()];
+        int i = 0;
+        for (Charset charset : charsets) {
+          res[i++] = LookupElementBuilder.create(charset.name()).withCaseSensitivity(false);
         }
 
         return res;
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/references/domain/GormFetchModeCompletionProvider.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/references/domain/GormFetchModeCompletionProvider.java
index 701972b..bb56ab2 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/references/domain/GormFetchModeCompletionProvider.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/references/domain/GormFetchModeCompletionProvider.java
@@ -27,6 +27,7 @@ import com.intellij.codeInsight.completion.CompletionType;
 import com.intellij.codeInsight.completion.PrioritizedLookupElement;
 import com.intellij.codeInsight.lookup.LookupElement;
 import com.intellij.codeInsight.lookup.LookupElementBuilder;
+import com.intellij.icons.AllIcons;
 import com.intellij.openapi.util.Pair;
 import com.intellij.patterns.ElementPattern;
 import com.intellij.patterns.PlatformPatterns;
@@ -35,8 +36,6 @@ import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiModifier;
 import com.intellij.psi.PsiType;
 import com.intellij.psi.util.PsiTreeUtil;
-import com.intellij.ui.IconManager;
-import com.intellij.ui.PlatformIcons;
 import com.intellij.util.ProcessingContext;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.plugins.groovy.lang.completion.handlers.NamedArgumentInsertHandler;
@@ -89,7 +88,7 @@ public final class GormFetchModeCompletionProvider extends CompletionProvider<Co
     for (Map.Entry<String, Pair<PsiType, PsiElement>> entry : descriptor.getPersistentProperties().entrySet()) {
       if (descriptor.isToManyRelation(entry.getKey())) {
         LookupElement lookup = LookupElementBuilder.create(entry.getKey())
-          .withIcon(IconManager.getInstance().getPlatformIcon(PlatformIcons.Property))
+          .withIcon(AllIcons.Nodes.Property)
           .withInsertHandler(NamedArgumentInsertHandler.INSTANCE);
 
         result.addElement(PrioritizedLookupElement.withPriority(lookup, 1));
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsAppEngineDebuggerRunner.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsAppEngineDebuggerRunner.java
index 238f332..0dc25b0 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsAppEngineDebuggerRunner.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsAppEngineDebuggerRunner.java
@@ -42,7 +42,7 @@ public final class GrailsAppEngineDebuggerRunner extends GenericDebuggerRunner {
     if (!executorId.equals(DefaultDebugExecutor.EXECUTOR_ID)) return false;
     GrailsApplication application = runConfiguration.getGrailsApplicationNullable();
     if (!(application instanceof Grails2Application)) return false;
-    return ReadAction.compute(() -> {
+    return ReadAction.computeBlocking(() -> {
       GrailsStructure structure = GrailsStructure.getInstance(((Grails2Application)application).getModule());
       return structure != null && structure.isPluginInstalled("app-engine");
     });
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsConsole.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsConsole.java
index fab271b..6daf574 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsConsole.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsConsole.java
@@ -78,6 +78,7 @@ import java.nio.charset.StandardCharsets;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Queue;
+import kotlin.Unit;
 
 @Service(Service.Level.PROJECT)
 @State(name = "GrailsConsole", storages = @Storage(StoragePathMacros.WORKSPACE_FILE))
@@ -104,10 +105,12 @@ public final class GrailsConsole implements Disposable, PersistentStateComponent
     myConsole = (ConsoleViewImpl)TextConsoleBuilderFactory.getInstance().createBuilder(myProject).getConsole();
     Disposer.register(this, myConsole);
 
-    myToolWindow = (ToolWindowEx)ToolWindowManager.getInstance(myProject).registerToolWindow(
-      TOOL_WINDOW_ID, false, ToolWindowAnchor.BOTTOM, this, true
-    );
-    myToolWindow.setIcon(GroovyMvcIcons.Grails_13);
+    myToolWindow = (ToolWindowEx)ToolWindowManager.getInstance(myProject).registerToolWindow(TOOL_WINDOW_ID, builder -> {
+      builder.anchor = ToolWindowAnchor.BOTTOM;
+      builder.canCloseContent = false;
+      builder.icon = GroovyMvcIcons.Grails_13;
+      return Unit.INSTANCE;
+    });
     myToolWindow.setAdditionalGearActions(new DefaultActionGroup(new ToggleAction(GrailsBundle.message("action.text.auto.close.when.done")) {
 
       @Override
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsRunConfiguration.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsRunConfiguration.java
index d84a03f..ebf6a55 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsRunConfiguration.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/GrailsRunConfiguration.java
@@ -36,7 +36,6 @@ import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.WriteExternalException;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.LocalFileSystem;
-import com.intellij.util.JdomKt;
 import com.intellij.util.containers.ContainerUtil;
 import org.jdom.Element;
 import org.jetbrains.annotations.NotNull;
@@ -172,7 +171,7 @@ public final class GrailsRunConfiguration
     super.writeExternal(element);
 
     writeSetting(element, ROOT_ELEMENT_NAME, myGrailsApplicationRootPath);
-    JdomKt.addOptionTag(element, LAUNCH_BROWSER, Boolean.toString(myLaunchBrowser), "setting");
+    writeSetting(element, LAUNCH_BROWSER, Boolean.toString(myLaunchBrowser));
     writeSetting(element, LAUNCH_BROWSER_URL, myLaunchBrowserUrl);
 
     final List<GrailsRunConfigurationExtension> configurationExtensions = ContainerUtil.findAll(
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/LocatableRunConfigurationWithCommonParameters.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/LocatableRunConfigurationWithCommonParameters.java
index fa00cab..c85617d 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/LocatableRunConfigurationWithCommonParameters.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/LocatableRunConfigurationWithCommonParameters.java
@@ -26,7 +26,6 @@ import com.intellij.openapi.util.Comparing;
 import com.intellij.openapi.util.InvalidDataException;
 import com.intellij.openapi.util.WriteExternalException;
 import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.util.JdomKt;
 import org.jdom.Element;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
@@ -115,14 +114,14 @@ public abstract class LocatableRunConfigurationWithCommonParameters extends Loca
       }
       element.addContent(env);
     });
-    JdomKt.addOptionTag(element, "passParentEnv", Boolean.toString(myPassParentEnv), "setting");
+    writeSetting(element, "passParentEnv", Boolean.toString(myPassParentEnv));
   }
 
   /**
    * Writes a {@code <setting name=".." value=".."/>} child element, matching the legacy
    * {@code JDOMExternalizer.write} XML format so persisted run configurations stay compatible.
    */
-  protected static void writeSetting(@NotNull Element root, @NotNull String name, @Nullable String value) {
+  public static void writeSetting(@NotNull Element root, @NotNull String name, @Nullable String value) {
     Element setting = new Element("setting");
     setting.setAttribute("name", name);
     setting.setAttribute("value", value == null ? "" : value);
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3InstallationCommandExecutor.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3InstallationCommandExecutor.java
index 5fc0f44..85d00a3 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3InstallationCommandExecutor.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3InstallationCommandExecutor.java
@@ -26,6 +26,7 @@ import com.intellij.openapi.roots.ProjectRootManager;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.vfs.VfsUtilCore;
 import com.intellij.util.PathUtil;
+import com.intellij.util.containers.ContainerUtil;
 import org.jetbrains.annotations.NotNull;
 import org.apache.grails.intellij.lib.grails.rt.GrailsRtMarker;
 import org.apache.grails.intellij.plugin.GrailsBundle;
@@ -81,7 +82,7 @@ public final class Grails3InstallationCommandExecutor extends GrailsCommandLineE
     params.getVMParametersList().addAll("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-XX:CICompilerCount=3");
     params.getVMParametersList().addParametersString(command.getVmOptions());
     addCommonJvmOptions(params);
-    params.getClassPath().addAllFiles(runClassPath(new File(grailsSdk.getPath())));
+    params.getClassPath().addAllPaths(ContainerUtil.map(runClassPath(new File(grailsSdk.getPath())), File::toPath));
     params.getClassPath().add(PathUtil.getJarPathForClass(GrailsRtMarker.class)); // we add rt.jar to enable execution of idea scripts
     params.setMainClass("org.grails.cli.GrailsCli");
     command.addToParametersList(params.getProgramParametersList());
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3TestCommandLineState.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3TestCommandLineState.java
index 316aeaa..3ecc3dd 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3TestCommandLineState.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/Grails3TestCommandLineState.java
@@ -20,14 +20,10 @@ package org.apache.grails.intellij.plugin.runner.impl;
 
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.Executor;
-import com.intellij.execution.process.ProcessAdapter;
 import com.intellij.execution.process.ProcessEvent;
+import com.intellij.execution.process.ProcessListener;
 import com.intellij.execution.runners.ExecutionEnvironment;
 import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil;
-import com.intellij.execution.testframework.sm.runner.GeneralToSMTRunnerEventsConvertor;
-import com.intellij.execution.testframework.sm.runner.SMTestProxy;
-import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerUIActionsHandler;
-import com.intellij.execution.testframework.sm.runner.ui.SMTestRunnerResultsForm;
 import com.intellij.execution.ui.ConsoleView;
 import com.intellij.openapi.util.Key;
 import org.jetbrains.annotations.NotNull;
@@ -85,33 +81,16 @@ public class Grails3TestCommandLineState extends GrailsTestAppCommandLineState {
     GradleConsoleProperties consoleProperties =
       new GradleConsoleProperties(getConfiguration(), GrailsRunnerSetup.TEST_FRAMEWORK_NAME, executor);
     GradleTestsExecutionConsole console = new GradleTestsExecutionConsole(consoleProperties, splitterPropertyName);
-    console.setHelpId("reference.runToolWindow.testResultsTab");
-    console.initUI();
-    console.addAttachToProcessListener(handler -> {
-      SMTestRunnerResultsForm resultsViewer = console.getResultsViewer();
-      resultsViewer.addEventsListener(new SMTRunnerUIActionsHandler(consoleProperties));
-
-      SMTestProxy.SMRootTestProxy rootNode = resultsViewer.getTestsRootNode();
-      rootNode.setHandler(handler);
-
-      GeneralToSMTRunnerEventsConvertor eventsProcessor =
-        new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), rootNode, GrailsRunnerSetup.TEST_FRAMEWORK_NAME);
-      eventsProcessor.addEventsListener(resultsViewer);
-      eventsProcessor.onStartTesting();
-
-      handler.addProcessListener(new ProcessAdapter() {
-        @Override
-        public void processTerminated(@NotNull ProcessEvent event) {
-          eventsProcessor.onFinishTesting();
-        }
-
-        @Override
-        @SuppressWarnings("rawtypes") // ProcessListener declares a raw Key
-        public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
-          GradleTestsExecutionConsoleOutputProcessor.onOutput(console, event.getText(), outputType);
-        }
-      });
-    });
+    // Same wiring as the Gradle plugin's own test console manager: initConsoleView installs the
+    // results form, its events processor and the start/finish handling around the attached process.
+    SMTestRunnerConnectionUtil.initConsoleView(console, GrailsRunnerSetup.TEST_FRAMEWORK_NAME);
+    console.addAttachToProcessListener(handler -> handler.addProcessListener(new ProcessListener() {
+      @Override
+      @SuppressWarnings("rawtypes") // ProcessListener declares a raw Key
+      public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
+        GradleTestsExecutionConsoleOutputProcessor.onOutput(console, event.getText(), outputType);
+      }
+    }));
     return console;
   }
 }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/GrailsInstallationCommandExecutor.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/GrailsInstallationCommandExecutor.java
index 6a9cda5..e91994d 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/GrailsInstallationCommandExecutor.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/impl/GrailsInstallationCommandExecutor.java
@@ -19,7 +19,6 @@
 
 package org.apache.grails.intellij.plugin.runner.impl;
 
-import com.intellij.execution.ExecutionBundle;
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.configurations.JavaParameters;
 import com.intellij.execution.configurations.ParametersList;
@@ -37,9 +36,10 @@ import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.VfsUtilCore;
 import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.util.JdomKt;
+import com.intellij.util.EnvironmentUtil;
 import com.intellij.util.PathUtil;
 import com.intellij.util.PathsList;
+import org.apache.grails.intellij.plugin.runner.LocatableRunConfigurationWithCommonParameters;
 import org.jdom.Element;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -64,6 +64,8 @@ import org.apache.grails.intellij.plugin.util.version.Version;
 import org.apache.grails.intellij.plugin.mvc.MvcCommand;
 import org.jetbrains.plugins.groovy.util.GroovyUtils;
 
+import java.util.HashMap;
+import java.util.Map;
 import javax.swing.JCheckBox;
 import javax.swing.JComponent;
 import java.io.File;
@@ -192,7 +194,7 @@ public final class GrailsInstallationCommandExecutor
 
   @Override
   public void writeAdditionalConfiguration(@NotNull Boolean depsClassPath, @NotNull Element element) {
-    JdomKt.addOptionTag(element, DEPS_CLASSPATH, Boolean.toString(depsClassPath), "setting");
+    LocatableRunConfigurationWithCommonParameters.writeSetting(element, DEPS_CLASSPATH, Boolean.toString(depsClassPath));
   }
 
   public JavaParameters createJavaParameters(@NotNull OldGrailsApplication grailsApplication,
@@ -202,7 +204,7 @@ public final class GrailsInstallationCommandExecutor
     if (grailsSdk == null) throw new ExecutionException(GrailsBundle.message("dialog.message.grails.sdk.not.defined"));
     Module module = grailsApplication.getModule();
     final Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
-    if (sdk == null) throw new ExecutionException(ExecutionBundle.message("no.jdk.for.module.error.message", module.getName()));
+    if (sdk == null) throw new ExecutionException(GrailsBundle.message("dialog.message.no.jdk.for.module", module.getName()));
 
     final JavaParameters params = createJavaParameters(sdk, grailsSdk, command);
     final VirtualFile rootFile = grailsApplication.getRoot();
@@ -226,7 +228,10 @@ public final class GrailsInstallationCommandExecutor
     final String grailsSdkHomePath = grailsSdk.getPath();
 
     params.setJdk(sdk);
-    params.setupEnvs(command.getEnvVariables(), command.isPassParentEnvs());
+    Map<String, String> envs = new HashMap<>(command.getEnvVariables());
+    EnvironmentUtil.inlineParentOccurrences(envs);
+    params.setEnv(envs);
+    params.setPassParentEnvs(command.isPassParentEnvs());
     params.addEnv(GrailsConstants.GRAILS_HOME, FileUtil.toSystemDependentName(grailsSdkHomePath));
     GrailsFramework.addJavaHome(sdk, params);
 
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsApplicationCombobox.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsApplicationCombobox.java
index 96f4cca..851ae9e 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsApplicationCombobox.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsApplicationCombobox.java
@@ -33,6 +33,7 @@ import org.apache.grails.intellij.plugin.structure.GrailsApplication;
 import java.util.Collection;
 
 import static org.apache.grails.intellij.plugin.structure.GrailsApplications.COMPARATOR;
+import javax.swing.JList;
 
 public class GrailsApplicationCombobox extends ComboBox<GrailsApplication> {
 
@@ -60,18 +61,25 @@ public class GrailsApplicationCombobox extends ComboBox<GrailsApplication> {
       }
     };
     search.setupListeners();
-    setRenderer(SimpleListCellRenderer.create((label, grailsApplication, index) -> {
-      if (grailsApplication == null) {
-        label.setText(GrailsBundle.message("combobox.label.none.selected"));
-      }
-      else {
-        label.setIcon(grailsApplication.getIcon());
-        @NlsSafe String applicationName = grailsApplication.getName();
-        label.setText(applicationName);
-        @NlsSafe String path = grailsApplication.getRoot().getPath();
-        label.setToolTipText(path);
+    setRenderer(new SimpleListCellRenderer<>() {
+      @Override
+      public void customize(@NotNull JList<? extends GrailsApplication> list,
+                            GrailsApplication grailsApplication,
+                            int index,
+                            boolean selected,
+                            boolean hasFocus) {
+        if (grailsApplication == null) {
+          setText(GrailsBundle.message("combobox.label.none.selected"));
+        }
+        else {
+          setIcon(grailsApplication.getIcon());
+          @NlsSafe String applicationName = grailsApplication.getName();
+          setText(applicationName);
+          @NlsSafe String path = grailsApplication.getRoot().getPath();
+          setToolTipText(path);
+        }
       }
-    }));
+    });
   }
 
   public void disallowEmptySelection() {
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsRunConfigurationEditor.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsRunConfigurationEditor.java
index 6dc4efb..161b80d 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsRunConfigurationEditor.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/ui/GrailsRunConfigurationEditor.java
@@ -62,7 +62,8 @@ public class GrailsRunConfigurationEditor extends GrailsRunConfigurationEditorWi
   private JBLabel myVMParametersLabel;
   private RawCommandLineEditor myVMParameters;
 
-  private EnvironmentVariablesComponent myEnvVariablesComponent;
+  private JPanel myEnvVariablesPanel;
+  private final EnvironmentVariablesComponent myEnvVariablesComponent;
 
   private JBCheckBox myLaunchBrowser;
   private JBTextField myLaunchBrowserUrl;
@@ -72,6 +73,11 @@ public class GrailsRunConfigurationEditor extends GrailsRunConfigurationEditorWi
   private final Collection<SettingsEditor<GrailsRunConfiguration>> myExtensionEditors = new ArrayList<>();
 
   public GrailsRunConfigurationEditor(Project project) {
+    // Built here rather than by the form: the component takes the project, and the form's
+    // generated code can only use the no-argument constructor.
+    myEnvVariablesComponent = new EnvironmentVariablesComponent(project);
+    myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
+    myEnvVariablesPanel.add(myEnvVariablesComponent, BorderLayout.CENTER);
     myApplicationsCombo.setApplications(GrailsApplicationManager.getInstance(project).getApplications());
     myApplicationsCombo.addItemListener(e -> applicationChanged(getApplication()));
     myCommandLine.getDocument().addDocumentListener(new DocumentAdapter() {
@@ -80,7 +86,6 @@ public class GrailsRunConfigurationEditor extends GrailsRunConfigurationEditorWi
         commandLineChanged(getCommandLine());
       }
     });
-    myVMParameters.setDialogCaption("VM Options");
     myLaunchBrowser.addChangeListener(e -> myLaunchBrowserUrl.setEnabled(myLaunchBrowser.isEnabled() && myLaunchBrowser.isSelected()));
     setAnchor();
   }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/util/GrailsExecutionUtils.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/util/GrailsExecutionUtils.java
index 3ca06b1..3a4e611 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/util/GrailsExecutionUtils.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/runner/util/GrailsExecutionUtils.java
@@ -112,8 +112,8 @@ public final class GrailsExecutionUtils {
     if (file.isDirectory()) { // Development mode
       try {
         File tempFile = FileUtil.createTempFile("idea", AGENT_JAR_SUFFIX, true);
-        try (Compressor zip = new Compressor.Zip(tempFile)) {
-          zip.addDirectory(file);
+        try (Compressor zip = new Compressor.Zip(tempFile.toPath())) {
+          zip.addDirectory(file.toPath());
         }
         return tempFile.getAbsolutePath();
       }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java
index 031515b..8ad9590 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundService.java
@@ -20,25 +20,102 @@
 package org.apache.grails.intellij.plugin.service;
 
 import com.intellij.openapi.components.Service;
-import com.intellij.openapi.progress.BackgroundTaskQueue;
+import com.intellij.openapi.progress.ProgressIndicator;
+import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.progress.Task;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.NotNull;
-import org.apache.grails.intellij.plugin.GrailsBundle;
 
+import java.util.ArrayDeque;
+import java.util.Queue;
+
+/**
+ * Runs the plugin's backgroundable tasks one at a time, in the order they were queued.
+ * <p>
+ * Each task is started through {@link ProgressManager#run(Task)} only once the previous one has
+ * finished, so two structure-sync tasks never race each other. In unit-test mode the platform runs
+ * backgroundable tasks synchronously, and so does this queue.
+ */
 @Service(Service.Level.PROJECT)
 public final class GrailsBackgroundService {
-  private final BackgroundTaskQueue myQueue;
+  private final Queue<Task.Backgroundable> myQueue = new ArrayDeque<>();
+  private boolean myRunning;
+
+  public GrailsBackgroundService(@SuppressWarnings("unused") Project project) {
+  }
 
-  public GrailsBackgroundService(Project project) {
-    myQueue = new BackgroundTaskQueue(project, GrailsBundle.message("task.queue.title.grails.background.tasks"));
+  public void run(@NotNull Task.Backgroundable task) {
+    synchronized (myQueue) {
+      myQueue.add(task);
+      if (myRunning) return;
+      myRunning = true;
+    }
+    startNext();
   }
 
-  public void run(Task.Backgroundable task) {
-    myQueue.run(task);
+  private void startNext() {
+    final Task.Backgroundable next;
+    synchronized (myQueue) {
+      next = myQueue.poll();
+      if (next == null) {
+        myRunning = false;
+        return;
+      }
+    }
+    ProgressManager.getInstance().run(new Sequenced(next));
   }
 
   public static @NotNull GrailsBackgroundService getInstance(@NotNull Project project) {
     return project.getService(GrailsBackgroundService.class);
   }
+
+  /** Delegates everything to the queued task and starts the next one when it is done. */
+  private final class Sequenced extends Task.Backgroundable {
+    private final Task.Backgroundable myDelegate;
+
+    Sequenced(@NotNull Task.Backgroundable delegate) {
+      super(delegate.getProject(), delegate.getTitle(), delegate.isCancellable());
+      myDelegate = delegate;
+    }
+
+    @Override
+    public void run(@NotNull ProgressIndicator indicator) {
+      myDelegate.run(indicator);
+    }
+
+    @Override
+    public void onSuccess() {
+      myDelegate.onSuccess();
+    }
+
+    @Override
+    public void onCancel() {
+      myDelegate.onCancel();
+    }
+
+    @Override
+    public void onThrowable(@NotNull Throwable error) {
+      myDelegate.onThrowable(error);
+    }
+
+    @Override
+    public void onFinished() {
+      try {
+        myDelegate.onFinished();
+      }
+      finally {
+        startNext();
+      }
+    }
+
+    @Override
+    public boolean shouldStartInBackground() {
+      return myDelegate.shouldStartInBackground();
+    }
+
+    @Override
+    public boolean isConditionalModal() {
+      return myDelegate.isConditionalModal();
+    }
+  }
 }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringBeanDiscoverer.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringBeanDiscoverer.java
index daf23e5..32c3fc6 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringBeanDiscoverer.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringBeanDiscoverer.java
@@ -187,8 +187,17 @@ public final class GrailsSpringBeanDiscoverer extends CustomModuleComponentsDisc
     return result;
   }
 
+  private static @Nullable GrailsApplication findApplication(@NotNull Module module) {
+    final GrailsApplicationManager manager = GrailsApplicationManager.getInstance(module.getProject());
+    for (VirtualFile root : ModuleRootManager.getInstance(module).getContentRoots()) {
+      final GrailsApplication application = manager.findApplication(root);
+      if (application != null) return application;
+    }
+    return null;
+  }
+
   private static @NotNull List<String> getPluginsNamesFromDescriptors(Module module) {
-    final GrailsApplication application = GrailsApplicationManager.getInstance(module.getProject()).findApplication(module.getModuleFile());
+    final GrailsApplication application = findApplication(module);
     if (application == null) return Collections.emptyList();
     return ContainerUtil.map(GrailsPlugins.computePlugins(application), p -> p.getPluginName());
   }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringStereotypeAliasingPsiTargetMapper.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringStereotypeAliasingPsiTargetMapper.java
index 1704bc0..1fdd2cf 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringStereotypeAliasingPsiTargetMapper.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/spring/GrailsSpringStereotypeAliasingPsiTargetMapper.java
@@ -20,7 +20,6 @@
 package org.apache.grails.intellij.plugin.spring;
 
 import com.intellij.openapi.application.ReadAction;
-import com.intellij.openapi.project.DumbService;
 import com.intellij.pom.PomTarget;
 import com.intellij.psi.PsiClass;
 import com.intellij.psi.PsiTarget;
@@ -46,28 +45,29 @@ public final class GrailsSpringStereotypeAliasingPsiTargetMapper implements Alia
       return Collections.emptySet();
     }
 
-    return ReadAction.compute(() -> {
+    // Callers hold no read lock here, and the Spring model requires indexes; a read action that
+    // throws IndexNotReadyException in dumb mode is what DumbService.runReadActionInSmartMode did
+    // when nested in one, so this is the same behaviour without the deprecated wrapper.
+    return ReadAction.computeBlocking(() -> {
       final PsiClass psiClass = (PsiClass)psiTarget;
       if (psiClass.isInterface()) return Collections.emptySet();
 
-      return DumbService.getInstance(psiClass.getProject()).runReadActionInSmartMode(() -> {
-        if (!SpringCommonUtils.isSpringBeanCandidateClassInSpringProject(psiClass)) {
-          return Collections.emptySet();
-        }
+      if (!SpringCommonUtils.isSpringBeanCandidateClassInSpringProject(psiClass)) {
+        return Collections.emptySet();
+      }
 
-        final SpringJavaClassInfo info = SpringJavaClassInfo.getSpringJavaClassInfo(psiClass);
-        final List<JamSpringBeanPointer> stereotypeMappedBeans = info.resolve().getStereotypeMappedBeans();
-        for (JamSpringBeanPointer pointer : stereotypeMappedBeans) {
-          JamPsiMemberSpringBean<?> stereotypeElement = pointer.getSpringBean();
-          if (stereotypeElement instanceof SpringStereotypeElement &&  psiClass.equals(stereotypeElement.getPsiElement())) {
-            PsiTarget target = ((SpringStereotypeElement)stereotypeElement).getPsiTarget();
-            if (target instanceof AliasingPsiTarget) {
-              return Collections.singleton((AliasingPsiTarget)target);
-            }
+      final SpringJavaClassInfo info = SpringJavaClassInfo.getSpringJavaClassInfo(psiClass);
+      final List<JamSpringBeanPointer> stereotypeMappedBeans = info.resolve().getStereotypeMappedBeans();
+      for (JamSpringBeanPointer pointer : stereotypeMappedBeans) {
+        JamPsiMemberSpringBean<?> stereotypeElement = pointer.getSpringBean();
+        if (stereotypeElement instanceof SpringStereotypeElement && psiClass.equals(stereotypeElement.getPsiElement())) {
+          PsiTarget target = ((SpringStereotypeElement)stereotypeElement).getPsiTarget();
+          if (target instanceof AliasingPsiTarget) {
+            return Collections.singleton((AliasingPsiTarget)target);
           }
         }
-        return Collections.emptySet();
-      });
+      }
+      return Collections.emptySet();
     });
   }
 }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/GrailsApplicationManager.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/GrailsApplicationManager.java
index b884647..7b37c5c 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/GrailsApplicationManager.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/GrailsApplicationManager.java
@@ -29,6 +29,7 @@ import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.ProjectFileIndex;
 import com.intellij.openapi.util.ModificationTracker;
 import com.intellij.openapi.util.SimpleModificationTracker;
+import com.intellij.openapi.vfs.LocalFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiFile;
@@ -66,7 +67,7 @@ public final class GrailsApplicationManager implements ModificationTracker, Disp
   public GrailsApplicationManager(@NotNull Project project) {
     myProject = project;
     myFileIndex = ProjectFileIndex.getInstance(project);
-    GrailsApplicationProvider.APPLICATION_PROVIDER.addChangeListener(() -> {
+    GrailsApplicationProvider.APPLICATION_PROVIDER.getPoint().addChangeListener(() -> {
       if (project.isDisposed()) {
         return;
       }
@@ -100,14 +101,21 @@ public final class GrailsApplicationManager implements ModificationTracker, Disp
   @Contract("null -> null")
   public @Nullable GrailsApplication findApplication(@Nullable VirtualFile file) {
     if (file == null || !hasApplications()) return null;
+    final VirtualFile projectDir = getProjectDir();
     for (VirtualFile currentFile = myFileIndex.getContentRootForFile(file); currentFile != null; currentFile = currentFile.getParent()) {
       final GrailsApplication application = getApplicationByRoot(currentFile);
       if (application != null) return application;
-      if (currentFile.equals(myProject.getBaseDir())) break;
+      if (currentFile.equals(projectDir)) break;
     }
     return null;
   }
 
+  /** The directory the project configuration lives under: the upper bound of the walk above. */
+  private @Nullable VirtualFile getProjectDir() {
+    final String basePath = myProject.getBasePath();
+    return basePath == null ? null : LocalFileSystem.getInstance().findFileByPath(basePath);
+  }
+
   @Contract("null -> null")
   public @Nullable GrailsApplication getApplicationByRoot(@Nullable VirtualFile root) {
     if (root == null) return null;
@@ -122,7 +130,10 @@ public final class GrailsApplicationManager implements ModificationTracker, Disp
       LOG.debug("Update queued from " + new Throwable().getStackTrace()[2]);
     }
 
-    return ReadAction.nonBlocking(this::doUpdate)
+    return ReadAction.nonBlocking(() -> {
+        doUpdate();
+        return null;
+      })
       .inSmartMode(myProject)
       .expireWith(this)
       .submit(ourExecutorService);
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/impl/Grails2Application.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/impl/Grails2Application.java
index 6e52925..3b3b56f 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/impl/Grails2Application.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/impl/Grails2Application.java
@@ -64,11 +64,11 @@ public final class Grails2Application extends OldGrailsModuleBasedApplication {
   }
 
   private @Nullable String getApplicationPropertiesValue(@NotNull String key) {
-    return ReadAction.compute(() -> GrailsProperties.getPropertyValue(getApplicationProperties(), key));
+    return ReadAction.computeBlocking(() -> GrailsProperties.getPropertyValue(getApplicationProperties(), key));
   }
 
   private boolean getBooleanSetting(@NotNull String key) {
-    return ReadAction.compute(() -> {
+    return ReadAction.computeBlocking(() -> {
       String value = GrailsSettingsService.getGrailsSettings(getModule()).properties.get(key);
       return value != null && Boolean.parseBoolean(value);
     });
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsApplicationBackgroundTask.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsApplicationBackgroundTask.java
index eb9ce15..3aec042 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsApplicationBackgroundTask.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsApplicationBackgroundTask.java
@@ -72,7 +72,7 @@ public abstract class GrailsApplicationBackgroundTask extends Task.Backgroundabl
 
     @Override
     public @NotNull Collection<GrailsApplication> get() {
-      return ReadAction.compute(() -> GrailsApplicationManager.getInstance(myProject).getApplications());
+      return ReadAction.computeBlocking(() -> GrailsApplicationManager.getInstance(myProject).getApplications());
     }
   }
 }
diff --git a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsSdkCheckTask.java b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsSdkCheckTask.java
index d0a0c73..cf639b0 100644
--- a/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsSdkCheckTask.java
+++ b/plugin/src/main/java/org/apache/grails/intellij/plugin/structure/sync/GrailsSdkCheckTask.java
@@ -19,9 +19,8 @@
 
 package org.apache.grails.intellij.plugin.structure.sync;
 
-import com.intellij.notification.Notification;
+import com.intellij.notification.NotificationAction;
 import com.intellij.notification.NotificationGroupManager;
-import com.intellij.notification.NotificationListener;
 import com.intellij.notification.NotificationType;
 import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.openapi.project.Project;
@@ -31,7 +30,6 @@ import org.apache.grails.intellij.plugin.runner.GrailsCommandExecutor;
 import org.apache.grails.intellij.plugin.structure.GrailsApplication;
 import org.apache.grails.intellij.plugin.ui.GrailsConfigureSDKDialog;
 
-import javax.swing.event.HyperlinkEvent;
 
 public class GrailsSdkCheckTask extends GrailsApplicationBackgroundTask {
 
@@ -48,13 +46,9 @@ public class GrailsSdkCheckTask extends GrailsApplicationBackgroundTask {
     NotificationGroupManager.getInstance().getNotificationGroup("Grails Configure").createNotification(
       GrailsBundle.message("grails.sdk.not.found.title"), content,
       NotificationType.INFORMATION)
-      .setListener(
-        new NotificationListener.Adapter() {
-          @Override
-          protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent e) {
-            new GrailsConfigureSDKDialog(application.getProject()).setGrailsApplication(application).show();
-          }
-        })
+      .addAction(NotificationAction.createSimpleExpiring(
+        GrailsBundle.message("action.Grails.ChangeSDK.text"),
+        () -> new GrailsConfigureSDKDialog(application.getProject()).setGrailsApplication(application).show()))
       .setImportant(true)
       .notify(application.getProject());
   }
diff --git a/plugin/src/main/java/org/jetbrains/plugins/grails/runner/ui/GrailsRunConfigurationEditor.form b/plugin/src/main/java/org/jetbrains/plugins/grails/runner/ui/GrailsRunConfigurationEditor.form
index 012c32b..fe5daad 100644
--- a/plugin/src/main/java/org/jetbrains/plugins/grails/runner/ui/GrailsRunConfigurationEditor.form
+++ b/plugin/src/main/java/org/jetbrains/plugins/grails/runner/ui/GrailsRunConfigurationEditor.form
@@ -53,14 +53,14 @@
         </constraints>
         <properties/>
       </component>
-      <component id="16626" class="com.intellij.execution.configuration.EnvironmentVariablesComponent" binding="myEnvVariablesComponent">
+      <grid id="16626" binding="myEnvVariablesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
         <constraints>
           <grid row="3" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
         </constraints>
-        <properties>
-          <labelLocation value="West"/>
-        </properties>
-      </component>
+        <properties/>
+        <border type="none"/>
+        <children/>
+      </grid>
       <component id="ffbc3" class="com.intellij.ui.components.JBCheckBox" binding="myLaunchBrowser" default-binding="true">
         <constraints>
           <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
diff --git a/plugin/src/main/resources/META-INF/plugin.xml b/plugin/src/main/resources/META-INF/plugin.xml
index d17e1ab..632efbe 100644
--- a/plugin/src/main/resources/META-INF/plugin.xml
+++ b/plugin/src/main/resources/META-INF/plugin.xml
@@ -385,6 +385,7 @@
     <referencesSearch implementation="org.apache.grails.intellij.plugin.spring.SpringBeanReferenceSearcher"/>
 
     <debugger.positionManagerFactory implementation="org.apache.grails.intellij.plugin.lang.gsp.debug.GspPositionManagerFactory"/>
+    <debugger.javaDebugAware implementation="org.apache.grails.intellij.plugin.lang.gsp.debug.GspJavaDebugAware"/>
 
     <defaultLiveTemplates file="liveTemplates/gsp.xml"/>
     <iconProvider implementation="org.apache.grails.intellij.plugin.projectView.GrailsIconProvider"/>
diff --git a/plugin/src/main/resources/messages/GrailsBundle.properties b/plugin/src/main/resources/messages/GrailsBundle.properties
index 3b50e00..e2140df 100644
--- a/plugin/src/main/resources/messages/GrailsBundle.properties
+++ b/plugin/src/main/resources/messages/GrailsBundle.properties
@@ -132,16 +132,10 @@ livetemplate.description.surround.gsp.if=Surround with <g:if></g:if>
 # Grails 3
 ########################################################################################################################
 grails.sdk.not.found.title=Grails SDK not found
-grails.sdk.not.found.content=\
-<html><body>\
-  IDEA cannot run Grails commands in {0}.\
-  <br/>\
-  <a href="configure_sdk">Configure Grails SDK</a>\
-</body></html>
+grails.sdk.not.found.content=IDEA cannot run Grails commands in {0}.
 action.Grails.ChangeSDK.text=Configure Grails SDK
 unresolved.pattern.cannot.resolve.template.0.gsp=Cannot resolve template ''_{0}.gsp''
 quick.fix.family.name.create.template.0=Create template ''{0}''
-task.queue.title.grails.background.tasks=Grails background tasks
 checkbox.tooltip.text.html.nbsp.0.html=<html>&nbsp;{0}</html>
 intention.text.create.action=Create action
 intention.text.extract.selected.text.to.message.properties=Extract selected text to message.properties
@@ -220,6 +214,7 @@ mvc.plugins.dialog.message.failed.to.reload.plugin.list=Failed to reload plugin
 mvc.plugins.action.text.reload.list=Reload Plugin List
 mvc.plugins.action.description.reload.list=Reload plugin list
 dialog.message.grails.sdk.not.defined=Grails SDK is not defined
+dialog.message.no.jdk.for.module=No JDK for module ''{0}''
 dialog.message.cannot.create.command.line.for=Cannot create command line for ''{0}'' in {1}
 dialog.message.grails.application.not.found=Grails application is not found
 dialog.message.cannot.execute.grails.command=Cannot execute Grails command: {0}
diff --git a/plugin/src/test/java/org/apache/grails/intellij/module/maven/MavenCommandExecutorTest.java b/plugin/src/test/java/org/apache/grails/intellij/module/maven/MavenCommandExecutorTest.java
new file mode 100644
index 0000000..e30e374
--- /dev/null
+++ b/plugin/src/test/java/org/apache/grails/intellij/module/maven/MavenCommandExecutorTest.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.grails.intellij.module.maven;
+
+import com.intellij.execution.ExecutionException;
+import com.intellij.execution.configurations.JavaParameters;
+import com.intellij.execution.configurations.ParametersList;
+import com.intellij.openapi.roots.ModuleRootManager;
+import org.apache.grails.intellij.lib.testFramework.GrailsTestCase;
+import org.apache.grails.intellij.plugin.mvc.MvcCommand;
+import org.jetbrains.idea.maven.execution.RunnerBundle;
+import org.jetbrains.idea.maven.execution.MavenRunner;
+import org.jetbrains.idea.maven.execution.MavenRunnerSettings;
+import org.jetbrains.idea.maven.importing.MavenPomPathModuleService;
+import org.jetbrains.idea.maven.model.MavenExplicitProfiles;
+import org.jetbrains.idea.maven.model.MavenId;
+import org.jetbrains.idea.maven.project.MavenGeneralSettings;
+import org.jetbrains.idea.maven.project.MavenInSpecificPath;
+import org.jetbrains.idea.maven.project.MavenProjectsManager;
+import org.jetbrains.idea.maven.project.MavenWorkspaceSettingsComponent;
+
+import java.util.List;
+import java.util.Map;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class MavenCommandExecutorTest extends GrailsTestCase {
+
+  private MavenRunnerSettings myOriginalRunnerSettings;
+  private MavenGeneralSettings myOriginalGeneralSettings;
+  private GrailsMavenApplication myApplication;
+
+  @Override
+  protected void setUp() throws Exception {
+    super.setUp();
+    myOriginalRunnerSettings = MavenRunner.getInstance(getProject()).getSettings();
+    MavenRunnerSettings runnerSettings = new MavenRunnerSettings();
+    runnerSettings.setJreName(MavenRunnerSettings.USE_PROJECT_JDK);
+    MavenRunner.getInstance(getProject()).loadState(runnerSettings);
+    var workspaceSettings = MavenWorkspaceSettingsComponent.getInstance(getProject()).getSettings();
+    myOriginalGeneralSettings = workspaceSettings.getGeneralSettings();
+    workspaceSettings.setGeneralSettings(new MavenGeneralSettings(getProject()));
+    var root = myFixture.addFileToProject("pom.xml", "<project/>").getVirtualFile().getParent();
+    myApplication = new GrailsMavenApplication(getModule(), root, new MavenId("test", "app", "1.0"));
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    try {
+      MavenRunner.getInstance(getProject()).loadState(myOriginalRunnerSettings);
+      MavenWorkspaceSettingsComponent.getInstance(getProject()).getSettings().setGeneralSettings(myOriginalGeneralSettings);
+    }
+    finally {
+      super.tearDown();
+    }
+  }
+
+  public void testMappedGoalPreservesJavaLaunchOptionsAndRunnerSettings() throws Exception {
+    MavenRunnerSettings settings = MavenRunner.getInstance(getProject()).getSettings();
+    settings.setVmOptions("-Doriginal=true");
+    settings.setEnvironmentProperties(Map.of("GRAILS_TEST_ENV", "value"));
+    settings.setPassParentEnv(false);
+    settings.getMavenProperties().put("custom", "value");
+    MvcCommand command = new MvcCommand("run-app", "--port=9090", "argument with spaces");
+    command.setVmOptions("-Xmx512m");
+    command.setEnv("prod");
+    command.getProperties().add("-Dgrails.server.host=localhost");
+
+    JavaParameters parameters = new MavenCommandExecutor().createJavaParameters(myApplication, command);
+
+    assertEquals("org.codehaus.classworlds.Launcher", parameters.getMainClass());
+    assertSame(ModuleRootManager.getInstance(getModule()).getSdk(), parameters.getJdk());
+    assertEquals(myApplication.getRoot().getPath(), parameters.getWorkingDirectory());
+    assertThat(parameters.getClassPath().getPathList()).isNotEmpty();
+    assertThat(parameters.getProgramParametersList().getList()).contains("grails:run-app", "-Dcustom=value");
+    ParametersList vm = parameters.getVMParametersList();
+    assertThat(vm.getList()).contains("-Xmx512m", "-Dgrails.env=prod", "-Dgrails.server.host=localhost");
+    assertEquals(ParametersList.join(command.getArgs()), vm.getPropertyValue("grails.cli.args"));
+    assertEquals("value", parameters.getEnv().get("GRAILS_TEST_ENV"));
+    assertFalse(parameters.isPassParentEnvs());
+    assertEquals("-Doriginal=true", settings.getVmOptions());
+    assertEquals(Map.of("custom", "value"), settings.getMavenProperties());
+  }
+
+  public void testUnmappedAndLegacyTestGoalsUseExecWithoutLeakingProperties() throws Exception {
+    assertTrue(myApplication.getGrailsVersion().compareToString("2.1.0") < 0);
+    MavenCommandExecutor executor = new MavenCommandExecutor();
+    for (String goal : List.of("create-domain-class", "test-app")) {
+      MvcCommand command = new MvcCommand(goal, "Example with spaces");
+      JavaParameters parameters = executor.createJavaParameters(myApplication, command);
+      ParametersList program = parameters.getProgramParametersList();
+      assertThat(program.getList()).contains("grails:exec");
+      assertEquals(goal, program.getPropertyValue("command"));
+      assertEquals(ParametersList.join(command.getArgs()), program.getPropertyValue("args"));
+      assertFalse(parameters.getVMParametersList().hasProperty("grails.cli.args"));
+    }
+    ParametersList program = executor.createJavaParameters(myApplication, new MvcCommand("war")).getProgramParametersList();
+    assertThat(program.getList()).contains("grails:war").doesNotContain("grails:exec");
+    assertFalse(program.hasProperty("command"));
+    assertFalse(program.hasProperty("args"));
+    assertThat(MavenRunner.getInstance(getProject()).getSettings().getMavenProperties()).isEmpty();
+  }
+
+  public void testGeneralSettingsOverrideAndInheritance() throws Exception {
+    MavenGeneralSettings projectSettings = MavenProjectsManager.getInstance(getProject()).getGeneralSettings();
+    projectSettings.setWorkOffline(true);
+    MavenCommandExecutor executor = new MavenCommandExecutor();
+    MvcCommand command = new MvcCommand("war");
+    assertThat(executor.createJavaParameters(myApplication, command).getProgramParametersList().getList()).contains("--offline");
+
+    MavenGeneralSettings override = projectSettings.clone();
+    override.setWorkOffline(false);
+    override.setThreads("2");
+    ParametersList program = executor.createJavaParameters(myApplication, command, override).getProgramParametersList();
+    assertThat(program.getList()).doesNotContain("--offline").containsSubsequence("-T", "2");
+    assertTrue(projectSettings.isWorkOffline());
+  }
+
+  public void testCustomPomAndExplicitProfilesArePreserved() throws Exception {
+    MavenProjectsManager manager = MavenProjectsManager.getInstance(getProject());
+    MavenExplicitProfiles originalProfiles = manager.getExplicitProfiles();
+    MavenPomPathModuleService pomService = MavenPomPathModuleService.getInstance(getModule());
+    String originalPom = pomService.getPomFileUrl();
+    try {
+      manager.setExplicitProfiles(new MavenExplicitProfiles(List.of("enabled"), List.of("disabled")));
+      pomService.setPomFileUrl(myFixture.addFileToProject("custom-pom.xml", "<project/>").getVirtualFile().getUrl());
+      ParametersList program = new MavenCommandExecutor().createJavaParameters(myApplication, new MvcCommand("war"))
+        .getProgramParametersList();
+      assertThat(program.getList()).containsSubsequence("-f", "custom-pom.xml");
+      int profilesIndex = program.getList().indexOf("-P");
+      assertTrue(profilesIndex >= 0);
+      assertThat(program.getList().get(profilesIndex + 1).split(",")).containsExactlyInAnyOrder("enabled", "!disabled");
+    }
+    finally {
+      manager.setExplicitProfiles(originalProfiles);
+      pomService.setPomFileUrl(originalPom);
+    }
+  }
+
+  public void testInvalidMavenHomeStillThrowsExecutionException() throws Exception {
+    MavenGeneralSettings settings = new MavenGeneralSettings(getProject());
+    settings.setMavenHomeType(new MavenInSpecificPath(myApplication.getRoot().getPath() + "/missing-maven"));
+    try {
+      new MavenCommandExecutor().createJavaParameters(myApplication, new MvcCommand("war"), settings);
+      fail("Expected an invalid Maven home to fail parameter creation");
+    }
+    catch (ExecutionException expected) {
+      assertEquals(RunnerBundle.message("external.maven.home.no.default"), expected.getMessage());
+    }
+  }
+}
diff --git a/plugin/src/test/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProviderTest.java b/plugin/src/test/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProviderTest.java
new file mode 100644
index 0000000..837ea18
--- /dev/null
+++ b/plugin/src/test/java/org/apache/grails/intellij/plugin/GrailsAttachSourcesProviderTest.java
@@ -0,0 +1,220 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.grails.intellij.plugin;
+
+import com.intellij.codeInsight.AttachSourcesProvider.AttachSourcesAction;
+import com.intellij.ide.JavaUiBundle;
+import com.intellij.openapi.application.ApplicationManager;
+import com.intellij.openapi.application.ReadAction;
+import com.intellij.openapi.application.WriteAction;
+import com.intellij.openapi.application.impl.TestOnlyThreading;
+import com.intellij.openapi.roots.OrderRootType;
+import com.intellij.openapi.roots.libraries.Library;
+import com.intellij.openapi.vfs.JarFileSystem;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.platform.backend.workspace.WorkspaceModel;
+import com.intellij.platform.workspace.jps.entities.LibraryEntity;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.PsiManager;
+import com.intellij.testFramework.IdeaTestUtil;
+import com.intellij.testFramework.LightProjectDescriptor;
+import com.intellij.testFramework.PlatformTestUtil;
+import com.intellij.testFramework.PsiTestUtil;
+import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;
+import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase;
+import com.intellij.testFramework.fixtures.TempDirTestFixture;
+import com.intellij.testFramework.fixtures.impl.TempDirTestFixtureImpl;
+import com.intellij.workspaceModel.ide.legacyBridge.LibraryBridgesKt;
+import org.jetbrains.annotations.NotNull;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+
+public class GrailsAttachSourcesProviderTest extends LightJavaCodeInsightFixtureTestCase {
+  private final GrailsAttachSourcesProvider provider = new GrailsAttachSourcesProvider();
+  private final List<Library> libraries = new ArrayList<>();
+
+  @Override
+  protected @NotNull LightProjectDescriptor getProjectDescriptor() {
+    return new DefaultLightProjectDescriptor(IdeaTestUtil::getMockJdk11);
+  }
+
+  @Override
+  protected @NotNull TempDirTestFixture getTempDirFixture() {
+    // JarFileSystem requires real local files, not the light fixture's in-memory VFS.
+    return new TempDirTestFixtureImpl();
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    try {
+      for (Library library : libraries) {
+        PsiTestUtil.removeLibrary(getModule(), library);
+      }
+      libraries.clear();
+    }
+    catch (Throwable e) {
+      addSuppressedException(e);
+    }
+    finally {
+      super.tearDown();
+    }
+  }
+
+  public void testAttachesExistingSourcesThroughEntityAction() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    VirtualFile sources = createJar("grails/src/grails-core-2.0.0-sources.jar");
+    Library library = addLibrary(classes);
+    PsiFile file = jarFile(classes);
+
+    AttachSourcesAction action = assertOneElement(provider.getLibrariesActions(Set.of(entity(library)), file));
+    assertEquals(GrailsBundle.message("attache.source.from.grails.action.title", "$GRAILS_HOME/src/"), action.getName());
+    assertEquals(action.getName(), action.getBusyText());
+    assertTrue(action.perform(Set.of(entity(library)), getProject()).isDone());
+    assertSame(sources, assertOneElement(library.getFiles(OrderRootType.SOURCES)));
+    assertEmpty(provider.getLibrariesActions(Set.of(entity(library)), file));
+
+    assertTrue(action.perform(Set.of(entity(library)), getProject()).isDone());
+    assertSize(1, library.getFiles(OrderRootType.SOURCES));
+  }
+
+  public void testDiscoversExistingSourcesInBackgroundReadAction() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    createJar("grails/src/grails-core-2.0.0-sources.jar");
+    Library library = addLibrary(classes);
+    LibraryEntity entity = entity(library);
+    PsiFile file = jarFile(classes);
+    var application = ApplicationManager.getApplication();
+    assertFalse(application.isWriteAccessAllowed());
+
+    // Release the EDT fixture's write-intent lock so pending background writes cannot block the read action.
+    TestOnlyThreading.releaseTheAcquiredWriteIntentLockThenExecuteActionAndTakeWriteIntentLockBack(() -> {
+      AttachSourcesAction action = PlatformTestUtil.callOnBgtSynchronously(() -> ReadAction.compute(() -> {
+        assertFalse(application.isDispatchThread());
+        assertTrue(application.isReadAccessAllowed());
+        return assertOneElement(provider.getLibrariesActions(Set.of(entity), file));
+      }), 10);
+      assertNotNull(action);
+      assertEquals(GrailsBundle.message("attache.source.from.grails.action.title", "$GRAILS_HOME/src/"), action.getName());
+    });
+    assertEmpty(library.getFiles(OrderRootType.SOURCES));
+  }
+
+  public void testOffersDownloadWhenSourcesAreMissing() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    myFixture.getTempDirFixture().findOrCreateDir("grails/src");
+    Library library = addLibrary(classes);
+
+    AttachSourcesAction action = assertOneElement(provider.getLibrariesActions(Set.of(entity(library)), jarFile(classes)));
+    assertEquals(JavaUiBundle.message("attach.source.provider.download.sources.action.name"), action.getName());
+    assertEquals(JavaUiBundle.message("attach.source.provider.download.sources.action.busy.text"), action.getBusyText());
+    assertEmpty(library.getFiles(OrderRootType.SOURCES));
+  }
+
+  public void testIgnoresNonJarFiles() throws IOException {
+    Library library = addLibrary(createJar("grails/grails-core-2.0.0.jar"));
+    PsiFile file = myFixture.configureByText("plain.txt", "not in a jar");
+    assertEmpty(provider.getLibrariesActions(Set.of(entity(library)), file));
+  }
+
+  public void testIgnoresEmptyLibraryCollection() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    assertEmpty(provider.getLibrariesActions(Set.of(), jarFile(classes)));
+  }
+
+  public void testIgnoresMultipleDistinctLibraries() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    createJar("grails/src/grails-core-2.0.0-sources.jar");
+    Library first = addLibrary(classes);
+    Library second = addLibrary(classes);
+    assertEmpty(provider.getLibrariesActions(Set.of(entity(first), entity(second)), jarFile(classes)));
+  }
+
+  public void testAcceptsRepeatedEntityForSameLibrary() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    createJar("grails/src/grails-core-2.0.0-sources.jar");
+    LibraryEntity entity = entity(addLibrary(classes));
+    assertSize(1, provider.getLibrariesActions(List.of(entity, entity), jarFile(classes)));
+  }
+
+  public void testIgnoresLibraryWithoutCurrentBridge() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-2.0.0.jar");
+    createJar("grails/src/grails-core-2.0.0-sources.jar");
+    Library library = addLibrary(classes);
+    LibraryEntity entity = entity(library);
+    PsiFile file = jarFile(classes);
+    PsiTestUtil.removeLibrary(getModule(), library);
+    libraries.remove(library);
+    assertEmpty(provider.getLibrariesActions(Set.of(entity), file));
+  }
+
+  public void testIgnoresNonGrailsLibrary() throws IOException {
+    VirtualFile classes = createJar("other/other-2.0.0.jar");
+    createJar("other/src/other-2.0.0-sources.jar");
+    Library library = addLibrary(classes);
+    assertEmpty(provider.getLibrariesActions(Set.of(entity(library)), jarFile(classes)));
+  }
+
+  public void testIgnoresGrailsBefore14() throws IOException {
+    VirtualFile classes = createJar("grails/grails-core-1.3.7.jar");
+    createJar("grails/src/grails-core-1.3.7-sources.jar");
+    Library library = addLibrary(classes);
+    assertEmpty(provider.getLibrariesActions(Set.of(entity(library)), jarFile(classes)));
+  }
+
+  private Library addLibrary(VirtualFile classes) {
+    Library library = PsiTestUtil.addProjectLibrary(getModule(), "GrailsSources" + libraries.size(), List.of(classes), List.of());
+    libraries.add(library);
+    return library;
+  }
+
+  private LibraryEntity entity(Library library) {
+    LibraryEntity entity = LibraryBridgesKt.findLibraryEntity(library, WorkspaceModel.getInstance(getProject()).getCurrentSnapshot());
+    assertNotNull(entity);
+    return entity;
+  }
+
+  private PsiFile jarFile(VirtualFile root) {
+    VirtualFile entry = root.findChild("entry.txt");
+    assertNotNull(entry);
+    PsiFile file = PsiManager.getInstance(getProject()).findFile(entry);
+    assertNotNull(file);
+    return file;
+  }
+
+  private VirtualFile createJar(String path) throws IOException {
+    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+    try (JarOutputStream jar = new JarOutputStream(bytes)) {
+      jar.putNextEntry(new JarEntry("entry.txt"));
+      jar.write('x');
+      jar.closeEntry();
+    }
+    VirtualFile file = myFixture.getTempDirFixture().createFile(path);
+    WriteAction.run(() -> file.setBinaryContent(bytes.toByteArray()));
+    VirtualFile root = JarFileSystem.getInstance().getJarRootForLocalFile(file);
+    assertNotNull(root);
+    return root;
+  }
+}
diff --git a/plugin/src/test/java/org/apache/grails/intellij/plugin/config/GradleSettingsFileTest.java b/plugin/src/test/java/org/apache/grails/intellij/plugin/config/GradleSettingsFileTest.java
new file mode 100644
index 0000000..4053d3b
--- /dev/null
+++ b/plugin/src/test/java/org/apache/grails/intellij/plugin/config/GradleSettingsFileTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.grails.intellij.plugin.config;
+
+import com.intellij.openapi.application.WriteAction;
+import com.intellij.openapi.util.io.FileUtil;
+import org.apache.grails.intellij.lib.testFramework.GrailsTestCase;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+public class GradleSettingsFileTest extends GrailsTestCase {
+  private Path myRoot;
+
+  @Override
+  protected void setUp() throws Exception {
+    super.setUp();
+    myRoot = FileUtil.createTempDirectory("gradle-settings", null, true).toPath();
+  }
+
+  public void testCreatesSettingsForSingleProjectModule() throws Exception {
+    setUp(myRoot, myRoot, "shop", "shop");
+    assertEquals("rootProject.name = 'shop'\n", read("settings.gradle"));
+  }
+
+  public void testCreatesSettingsWithIncludeForNestedModule() throws Exception {
+    Path module = Files.createDirectories(myRoot.resolve("web"));
+    setUp(myRoot, module, "shop", "web");
+    assertEquals("rootProject.name = 'shop'\ninclude 'web'\n", read("settings.gradle"));
+  }
+
+  public void testMapsProjectDirWhenModuleDirDiffersFromName() throws Exception {
+    Path module = Files.createDirectories(myRoot.resolve("apps/web"));
+    setUp(myRoot, module, "shop", "shop-web");
+    assertEquals("rootProject.name = 'shop'\ninclude 'shop-web'\nproject(':shop-web').projectDir = file('apps/web')\n",
+                 read("settings.gradle"));
+  }
+
+  public void testLeavesExistingRootSettingsAlone() throws Exception {
+    write("settings.gradle", "rootProject.name = 'generated-by-grails'\n");
+    setUp(myRoot, myRoot, "shop", "shop");
+    assertEquals("rootProject.name = 'generated-by-grails'\n", read("settings.gradle"));
+  }
+
+  public void testAppendsIncludeToExistingSettingsOnce() throws Exception {
+    write("settings.gradle", "rootProject.name = 'shop'");
+    Path module = Files.createDirectories(myRoot.resolve("web"));
+    setUp(myRoot, module, "shop", "web");
+    setUp(myRoot, module, "shop", "web");
+    assertEquals("rootProject.name = 'shop'\ninclude 'web'\n", read("settings.gradle"));
+  }
+
+  public void testUsesKotlinSyntaxForKotlinSettings() throws Exception {
+    write("settings.gradle.kts", "rootProject.name = \"shop\"\n");
+    Path module = Files.createDirectories(myRoot.resolve("modules/web"));
+    setUp(myRoot, module, "shop", "web");
+    assertEquals("rootProject.name = \"shop\"\ninclude(\"web\")\nproject(\":web\").projectDir = file(\"modules/web\")\n",
+                 read("settings.gradle.kts"));
+    assertFalse(new File(myRoot.toFile(), "settings.gradle").exists());
+  }
+
+  private static void setUp(Path root, Path module, String projectName, String moduleName) throws IOException {
+    WriteAction.runAndWait(() -> GradleSettingsFile.setUp(root, module, projectName, moduleName));
+  }
+
+  private void write(String name, String text) throws IOException {
+    Files.writeString(myRoot.resolve(name), text, StandardCharsets.UTF_8);
+  }
+
+  private String read(String name) throws IOException {
+    return Files.readString(myRoot.resolve(name), StandardCharsets.UTF_8);
+  }
+}
diff --git a/plugin/src/test/java/org/apache/grails/intellij/plugin/gsp/GspJavaDebugAwareTest.java b/plugin/src/test/java/org/apache/grails/intellij/plugin/gsp/GspJavaDebugAwareTest.java
new file mode 100644
index 0000000..0eaf0bf
--- /dev/null
+++ b/plugin/src/test/java/org/apache/grails/intellij/plugin/gsp/GspJavaDebugAwareTest.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.grails.intellij.plugin.gsp;
+
+import com.intellij.debugger.engine.JavaDebugAware;
+import com.intellij.psi.PsiFile;
+import org.apache.grails.intellij.lib.testFramework.GrailsTestCase;
+import org.apache.grails.intellij.plugin.lang.gsp.debug.GspJavaDebugAware;
+
+public class GspJavaDebugAwareTest extends GrailsTestCase {
+  private final JavaDebugAware myDebugAware = new GspJavaDebugAware();
+
+  public void testGspFilesTakeJavaBreakpoints() {
+    PsiFile gsp = myFixture.configureByText("index.gsp", "<html><body><%= 1 + 1 %></body></html>");
+    assertTrue(myDebugAware.isBreakpointAware(gsp));
+    // every root of the GSP view provider, not only the GSP one
+    for (PsiFile root : gsp.getViewProvider().getAllFiles()) {
+      assertTrue(root.getLanguage().getID(), myDebugAware.isBreakpointAware(root));
+    }
+  }
+
+  public void testOtherFilesAreLeftToTheirOwnFileTypes() {
+    assertFalse(myDebugAware.isBreakpointAware(myFixture.configureByText("A.groovy", "class A {}")));
+    assertFalse(myDebugAware.isBreakpointAware(myFixture.configureByText("a.html", "<html/>")));
+  }
+}
diff --git a/plugin/src/test/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundServiceTest.java b/plugin/src/test/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundServiceTest.java
new file mode 100644
index 0000000..52d2615
--- /dev/null
+++ b/plugin/src/test/java/org/apache/grails/intellij/plugin/service/GrailsBackgroundServiceTest.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.grails.intellij.plugin.service;
+
+import com.intellij.openapi.progress.ProgressIndicator;
+import com.intellij.openapi.progress.Task;
+import com.intellij.openapi.project.Project;
+import org.apache.grails.intellij.lib.testFramework.GrailsTestCase;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GrailsBackgroundServiceTest extends GrailsTestCase {
+
+  public void testTasksRunInQueueOrderAndCompleteTheirLifecycle() {
+    List<String> events = new ArrayList<>();
+    GrailsBackgroundService service = GrailsBackgroundService.getInstance(getProject());
+    for (int i = 1; i <= 3; i++) {
+      service.run(new RecordingTask(getProject(), events, "t" + i));
+    }
+    // Backgroundable tasks run synchronously in unit-test mode, so the whole queue has drained here.
+    assertEquals(List.of("t1.run", "t1.onSuccess", "t1.onFinished",
+                         "t2.run", "t2.onSuccess", "t2.onFinished",
+                         "t3.run", "t3.onSuccess", "t3.onFinished"), events);
+  }
+
+  public void testQueueKeepsAcceptingTasksAfterItDrained() {
+    List<String> events = new ArrayList<>();
+    GrailsBackgroundService service = GrailsBackgroundService.getInstance(getProject());
+    service.run(new RecordingTask(getProject(), events, "first"));
+    service.run(new RecordingTask(getProject(), events, "second"));
+    assertEquals(List.of("first.run", "first.onSuccess", "first.onFinished",
+                         "second.run", "second.onSuccess", "second.onFinished"), events);
+  }
+
+  private static final class RecordingTask extends Task.Backgroundable {
+    private final List<String> myEvents;
+    private final String myName;
+
+    RecordingTask(Project project, List<String> events, String name) {
+      super(project, name, false);
+      myEvents = events;
+      myName = name;
+    }
+
+    @Override
+    public void run(@NotNull ProgressIndicator indicator) {
+      myEvents.add(myName + ".run");
+    }
+
+    @Override
+    public void onSuccess() {
+      myEvents.add(myName + ".onSuccess");
+    }
+
+    @Override
+    public void onFinished() {
+      myEvents.add(myName + ".onFinished");
+    }
+  }
+}
diff --git a/pluginModules/hibernate/src/main/java/org/apache/grails/intellij/module/hibernate/Grails3HibernateFacetActivity.java b/pluginModules/hibernate/src/main/java/org/apache/grails/intellij/module/hibernate/Grails3HibernateFacetActivity.java
index cbc9d08..f86e9f4 100644
--- a/pluginModules/hibernate/src/main/java/org/apache/grails/intellij/module/hibernate/Grails3HibernateFacetActivity.java
+++ b/pluginModules/hibernate/src/main/java/org/apache/grails/intellij/module/hibernate/Grails3HibernateFacetActivity.java
@@ -73,7 +73,7 @@ final class Grails3HibernateFacetActivity implements StartupActivity.DumbAware {
   private static void ensureGormFacets(@NotNull Project project) {
     if (project.isDisposed()) return;
 
-    Set<Module> modules = ReadAction.compute(() -> {
+    Set<Module> modules = ReadAction.computeBlocking(() -> {
       Set<Module> result = new LinkedHashSet<>();
       ProjectFileIndex fileIndex = ProjectFileIndex.getInstance(project);
       for (GrailsApplication application : GrailsApplicationManager.getInstance(project).getApplications()) {
@@ -108,7 +108,7 @@ final class Grails3HibernateFacetActivity implements StartupActivity.DumbAware {
   }
 
   private static boolean hasPersistenceFacet(@NotNull Module module) {
-    return ReadAction.compute(() -> {
+    return ReadAction.computeBlocking(() -> {
       FacetManager facetManager = FacetManager.getInstance(module);
       return !facetManager.getFacetsByType(HibernateFacet.ID).isEmpty()
              || !facetManager.getFacetsByType(JpaFacet.ID).isEmpty();
diff --git a/pluginModules/maven/src/main/java/org/apache/grails/intellij/module/maven/MavenCommandExecutor.java b/pluginModules/maven/src/main/java/org/apache/grails/intellij/module/maven/MavenCommandExecutor.java
index 1161e47..a6b8fee 100644
--- a/pluginModules/maven/src/main/java/org/apache/grails/intellij/module/maven/MavenCommandExecutor.java
+++ b/pluginModules/maven/src/main/java/org/apache/grails/intellij/module/maven/MavenCommandExecutor.java
@@ -37,7 +37,6 @@ import com.intellij.util.xmlb.XmlSerializer;
 import org.jdom.Element;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
-import org.jetbrains.idea.maven.execution.MavenExternalParameters;
 import org.jetbrains.idea.maven.execution.MavenRunConfiguration;
 import org.jetbrains.idea.maven.execution.MavenRunConfigurationType;
 import org.jetbrains.idea.maven.execution.MavenRunner;
@@ -158,9 +157,13 @@ final class MavenCommandExecutor extends GrailsCommandLineExecutor implements Gr
       explicitProfiles.getDisabledProfiles()
     );
 
-    final JavaParameters res = MavenExternalParameters.createJavaParameters(
-      project, runnerParameters, generalSettings, runnerSettings, null
-    );
+    ConfigurationFactory factory = MavenRunConfigurationType.getInstance().getConfigurationFactories()[0];
+    MavenRunConfiguration configuration = (MavenRunConfiguration)factory.createTemplateConfiguration(project);
+    configuration.setRunnerParameters(runnerParameters);
+    configuration.setGeneralSettings(generalSettings);
+    configuration.setRunnerSettings(runnerSettings);
+    // Grails listeners and debugger runners still require a Java launch, not a Maven script run state.
+    final JavaParameters res = configuration.createJavaParameters(project);
     addCommonJvmOptions(res);
     return res;
   }