You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2025/08/18 21:09:50 UTC

(grails-core) 01/01: Remove springloaded forge feature, it only works with JDK 8 or less

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

jamesfredley pushed a commit to branch remove-springloaded-feature
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 233b51b6955c84f8168222f9246026665c0dbb53
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Mon Aug 18 17:09:35 2025 -0400

    Remove springloaded forge feature, it only works with JDK 8 or less
---
 .../src/en/guide/commandLine/creatingProject.adoc  |   2 +-
 .../src/en/guide/commandLine/interactiveMode.adoc  |   3 +-
 .../src/en/ref/Command Line/create-plugin.adoc     |   2 +-
 .../src/en/ref/Command Line/create-restapi.adoc    |   2 +-
 .../src/en/ref/Command Line/create-web-plugin.adoc |   2 +-
 grails-doc/src/en/ref/Command Line/help.adoc       |   2 +-
 .../src/en/ref/Command Line/list-features.adoc     |   1 -
 .../build/gradle/templates/buildGradle.rocker.raw  |   7 --
 .../forge/feature/reloading/Springloaded.java      |  85 ---------------------
 .../grails-forge-core/resource-config.json         |   1 -
 .../springloaded/springloaded-1.2.8.RELEASE.jar    | Bin 439005 -> 0 bytes
 11 files changed, 6 insertions(+), 101 deletions(-)

diff --git a/grails-doc/src/en/guide/commandLine/creatingProject.adoc b/grails-doc/src/en/guide/commandLine/creatingProject.adoc
index a5dd55cfaf..89bd0b4f88 100644
--- a/grails-doc/src/en/guide/commandLine/creatingProject.adoc
+++ b/grails-doc/src/en/guide/commandLine/creatingProject.adoc
@@ -175,7 +175,7 @@ The "create-*" commands are used to produce a fundamental Grails project, allowi
 ----
 
 | -f, --features
-| The features to use. Possible values: h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties
+| The features to use. Possible values: h2, gorm-hibernate5, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties
 |
 [source,shell]
 ----
diff --git a/grails-doc/src/en/guide/commandLine/interactiveMode.adoc b/grails-doc/src/en/guide/commandLine/interactiveMode.adoc
index ef4e13f596..82b41e5b55 100644
--- a/grails-doc/src/en/guide/commandLine/interactiveMode.adoc
+++ b/grails-doc/src/en/guide/commandLine/interactiveMode.adoc
@@ -67,7 +67,7 @@ Creates an application
       [NAME]            The name of the application to create.
   -f, --features=FEATURE[,FEATURE...]
                         The features to use. Possible values: h2, scaffolding, gorm-hibernate5,
-                          spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat,
+                          spring-boot-starter-jetty, spring-boot-starter-tomcat,
                           micronaut-http-client, cache-ehcache, hibernate-validator, postgres,
                           mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb,
                           assertj, mockito, spring-boot-starter-undertow,
@@ -131,7 +131,6 @@ Available Features
   assertj                             AssertJ fluent assertions framework
   hamcrest                            Hamcrest matchers for JUnit
   jrebel                              Adds support for class reloading with JRebel (requires separate JRebel installation)
-  springloaded                        Adds support for class reloading with Spring Loaded
 
   Documentation
   asciidoctor                         Adds support for creating Asciidoctor documentation
diff --git a/grails-doc/src/en/ref/Command Line/create-plugin.adoc b/grails-doc/src/en/ref/Command Line/create-plugin.adoc
index 34dc7534ca..83e48b63a8 100644
--- a/grails-doc/src/en/ref/Command Line/create-plugin.adoc	
+++ b/grails-doc/src/en/ref/Command Line/create-plugin.adoc	
@@ -70,7 +70,7 @@ Options include specifying features, configuring the GORM implementation, select
 
 Here are the available options for the create-plugin command:
 
-- -f, --features=FEATURE[,FEATURE...]: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow,  github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, e [...]
+- -f, --features=FEATURE[,FEATURE...]: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow,  github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongod [...]
 - -g, --gorm=GORM Implementation: Specifies the GORM Implementation to configure for the plugin. Possible values are hibernate, mongodb, neo4j.
 - -h, --help: Displays the help message and exits.
 - -i, --inplace: Creates a service within the current directory.
diff --git a/grails-doc/src/en/ref/Command Line/create-restapi.adoc b/grails-doc/src/en/ref/Command Line/create-restapi.adoc
index 41e4283db7..d90abc816a 100644
--- a/grails-doc/src/en/ref/Command Line/create-restapi.adoc	
+++ b/grails-doc/src/en/ref/Command Line/create-restapi.adoc	
@@ -40,7 +40,7 @@ The `create-restapi` command accepts the following options:
 
 - `NAME`: The desired name for the REST API application.
 
-- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipe [...]
+- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, v [...]
 
 - `-g, --gorm=GORM Implementation`: Specifies the GORM Implementation to configure, with options like hibernate, mongodb, neo4j.
 
diff --git a/grails-doc/src/en/ref/Command Line/create-web-plugin.adoc b/grails-doc/src/en/ref/Command Line/create-web-plugin.adoc
index 9ec4cb344e..ba18df5f99 100644
--- a/grails-doc/src/en/ref/Command Line/create-web-plugin.adoc	
+++ b/grails-doc/src/en/ref/Command Line/create-web-plugin.adoc	
@@ -38,7 +38,7 @@ grails create-web-plugin [OPTIONS] NAME
 
 Here are the available options for the `create-web-plugin` command:
 
-- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor,  [...]
+- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongo [...]
 
 - `-g, --gorm=GORM Implementation`: Specifies the GORM Implementation to configure for the plugin. Possible values are hibernate, mongodb, neo4j.
 
diff --git a/grails-doc/src/en/ref/Command Line/help.adoc b/grails-doc/src/en/ref/Command Line/help.adoc
index 678034cbda..c29a670693 100644
--- a/grails-doc/src/en/ref/Command Line/help.adoc	
+++ b/grails-doc/src/en/ref/Command Line/help.adoc	
@@ -140,7 +140,7 @@ Creates an application
       [NAME]            The name of the application to create.
   -f, --features=FEATURE[,FEATURE...]
                         The features to use. Possible values: h2, scaffolding, gorm-hibernate5,
-                          spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat,
+                          spring-boot-starter-jetty, spring-boot-starter-tomcat,
                           micronaut-http-client, cache-ehcache, hibernate-validator, postgres,
                           mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb,
                           assertj, mockito, spring-boot-starter-undertow,
diff --git a/grails-doc/src/en/ref/Command Line/list-features.adoc b/grails-doc/src/en/ref/Command Line/list-features.adoc
index 34afcfe789..00bf3d3f5e 100644
--- a/grails-doc/src/en/ref/Command Line/list-features.adoc	
+++ b/grails-doc/src/en/ref/Command Line/list-features.adoc	
@@ -80,7 +80,6 @@ Available Features
   assertj                             AssertJ fluent assertions framework
   hamcrest                            Hamcrest matchers for JUnit
   jrebel                              Adds support for class reloading with JRebel (requires separate JRebel installation)
-  springloaded                        Adds support for class reloading with Spring Loaded
 
   Documentation
   asciidoctor                         Adds support for creating Asciidoctor documentation
diff --git a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw
index 160cffbb21..9ab38905ce 100644
--- a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw
+++ b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw
@@ -114,13 +114,6 @@ run {
 
 }
 
-@if (features.contains("springloaded")) {
-run {
-    jvmArgs("-noverify", "-javaagent:agent/springloaded-1.2.8.RELEASE.jar")
-}
-
-}
-
 @if (features.contains("spock")) {
 tasks.withType(Test) {
     useJUnitPlatform()
diff --git a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/reloading/Springloaded.java b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/reloading/Springloaded.java
deleted file mode 100644
index 50c5939e7d..0000000000
--- a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/reloading/Springloaded.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *  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.grails.forge.feature.reloading;
-
-import jakarta.inject.Singleton;
-import org.grails.forge.application.generator.GeneratorContext;
-import org.grails.forge.feature.Feature;
-import org.grails.forge.feature.FeatureContext;
-import org.grails.forge.feature.FeaturePredicate;
-import org.grails.forge.template.BinaryTemplate;
-
-import java.util.Optional;
-
-@Singleton
-public class Springloaded implements ReloadingFeature {
-
-    private static final String JAR_NAME = "springloaded-1.2.8.RELEASE.jar";
-
-    @Override
-    public String getName() {
-        return "springloaded";
-    }
-
-    @Override
-    public String getTitle() {
-        return "Spring Loaded JVM Agent";
-    }
-
-    @Override
-    public String getDescription() {
-        return "Adds support for class reloading with Spring Loaded";
-    }
-
-    @Override
-    public boolean isVisible() {
-        return false;
-    }
-
-    @Override
-    public void processSelectedFeatures(FeatureContext featureContext) {
-        int jdkVersion = featureContext.getJavaVersion().majorVersion();
-        if (jdkVersion >= 9) {
-            Springloaded springloaded = this;
-            featureContext.exclude(new FeaturePredicate() {
-                @Override
-                public boolean test(Feature feature) {
-                    return feature == springloaded;
-                }
-
-                @Override
-                public Optional<String> getWarning() {
-                    return Optional.of("Springloaded was excluded because it does not support JDK " + jdkVersion);
-                }
-            });
-        }
-    }
-
-    @Override
-    public void apply(GeneratorContext generatorContext) {
-        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-        generatorContext.addTemplate("springLoadedJar",
-                new BinaryTemplate("agent/" + JAR_NAME, classLoader.getResource("springloaded/" + JAR_NAME)));
-    }
-
-    @Override
-    public String getDocumentation() {
-        return "https://docs.micronaut.io/latest/guide/index.html#springloaded";
-    }
-}
diff --git a/grails-forge/grails-forge-core/src/main/resources/META-INF/native-image/org.grails.forge/grails-forge-core/resource-config.json b/grails-forge/grails-forge-core/src/main/resources/META-INF/native-image/org.grails.forge/grails-forge-core/resource-config.json
index fcc0542b09..c622c31397 100644
--- a/grails-forge/grails-forge-core/src/main/resources/META-INF/native-image/org.grails.forge/grails-forge-core/resource-config.json
+++ b/grails-forge/grails-forge-core/src/main/resources/META-INF/native-image/org.grails.forge/grails-forge-core/resource-config.json
@@ -7,7 +7,6 @@
       {"pattern":"gsp/.*$"},
       {"pattern":"i18n/.*$"},
       {"pattern":".gitkeep"},
-      {"pattern":"springloaded/.*$"},
       {"pattern":"\\Qgrails-versions.properties\\E"},
       {"pattern":"pom.xml"}
     ]
diff --git a/grails-forge/grails-forge-core/src/main/resources/springloaded/springloaded-1.2.8.RELEASE.jar b/grails-forge/grails-forge-core/src/main/resources/springloaded/springloaded-1.2.8.RELEASE.jar
deleted file mode 100644
index 84584f7280..0000000000
Binary files a/grails-forge/grails-forge-core/src/main/resources/springloaded/springloaded-1.2.8.RELEASE.jar and /dev/null differ