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

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

commit d214a06fb2ea7d6b6fcb8fdb0f8e92fea5c3a9cd
Author: James Fredley <[email protected]>
AuthorDate: Thu Oct 2 10:55:38 2025 -0400

    Remove Neo4j GORM support and related tests
    
    Will return when Grails Data for Neo4j has been updated for Grails 7 or 8.  
Deleted the Neo4jGorm feature implementation and its associated test 
specification. Updated GormImpl enum to remove the NEO4J option and cleaned up 
MongoGormSpec to eliminate references to Neo4j. This change removes support for 
GORM with Neo4j from the project.
---
 .../grails/forge/feature/database/Neo4jGorm.java   | 71 ----------------------
 .../java/org/grails/forge/options/GormImpl.java    |  3 +-
 .../forge/feature/database/MongoGormSpec.groovy    |  9 ---
 .../forge/feature/database/Neo4JGormSpec.groovy    | 67 --------------------
 4 files changed, 1 insertion(+), 149 deletions(-)

diff --git 
a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/Neo4jGorm.java
 
b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/Neo4jGorm.java
deleted file mode 100644
index 4a2656a7f6..0000000000
--- 
a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/Neo4jGorm.java
+++ /dev/null
@@ -1,71 +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.database;
-
-import jakarta.inject.Singleton;
-import org.grails.forge.application.ApplicationType;
-import org.grails.forge.application.generator.GeneratorContext;
-import org.grails.forge.build.dependencies.Dependency;
-import org.grails.forge.feature.Feature;
-import org.grails.forge.options.GormImpl;
-import org.grails.forge.options.Options;
-
-import java.util.Map;
-import java.util.Set;
-
-@Singleton
-public class Neo4jGorm extends GormOneOfFeature {
-
-    @Override
-    public String getName() {
-        return "gorm-neo4j";
-    }
-
-    @Override
-    public String getTitle() {
-        return "GORM for Neo4j";
-    }
-
-    @Override
-    public String getDescription() {
-        return "Configure GORM for using Neo4j";
-    }
-
-    @Override
-    public void apply(GeneratorContext generatorContext) {
-        Map<String, Object> config = generatorContext.getConfiguration();
-        applyDefaultGormConfig(config);
-        config.put("grails.neo4j.type", "embedded");
-        config.put("grails.neo4j.location", "build/data/neo4j");
-        generatorContext.addDependency(Dependency.builder()
-                .groupId("org.grails.plugins")
-                .artifactId("neo4j")
-                .implementation());
-
-        generatorContext.addDependency(Dependency.builder()
-                .groupId("org.neo4j.test")
-                .artifactId("neo4j-harness")
-                .testRuntimeOnly());
-    }
-
-    @Override
-    public boolean shouldApply(ApplicationType applicationType, Options 
options, Set<Feature> selectedFeatures) {
-        return selectedFeatures.stream().anyMatch(f -> f instanceof Neo4jGorm) 
|| options.getGormImpl() == GormImpl.NEO4J;
-    }
-}
diff --git 
a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/GormImpl.java
 
b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/GormImpl.java
index 6b907297fd..a216c382ee 100644
--- 
a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/GormImpl.java
+++ 
b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/GormImpl.java
@@ -23,8 +23,7 @@ import io.micronaut.core.annotation.NonNull;
 public enum GormImpl {
 
     HIBERNATE("gorm-hibernate5"),
-    MONGODB("gorm-mongodb"),
-    NEO4J("gorm-neo4j");
+    MONGODB("gorm-mongodb");
 
     public static final GormImpl DEFAULT_OPTION = HIBERNATE;
     private final String featureName;
diff --git 
a/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/MongoGormSpec.groovy
 
b/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/MongoGormSpec.groovy
index bc7144bb36..c8a0eda408 100644
--- 
a/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/MongoGormSpec.groovy
+++ 
b/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/MongoGormSpec.groovy
@@ -43,15 +43,6 @@ class MongoGormSpec extends ApplicationContextSpec 
implements CommandOutputFixtu
         features.contains("gorm-mongodb")
     }
 
-    void "test there can only be one of either MongoDB or Neo4j feature"() {
-        when:
-        getFeatures(beanContext.getBeansOfType(GormOneOfFeature)*.name)
-
-        then:
-        def ex = thrown(IllegalArgumentException)
-        ex.message.contains("There can only be one of the following features 
selected")
-    }
-
     void "test dependencies are present for gradle"() {
         when:
         String template = new BuildBuilder(beanContext)
diff --git 
a/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/Neo4JGormSpec.groovy
 
b/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/Neo4JGormSpec.groovy
deleted file mode 100644
index 3a8f68931c..0000000000
--- 
a/grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/Neo4JGormSpec.groovy
+++ /dev/null
@@ -1,67 +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.database
-
-import org.grails.forge.ApplicationContextSpec
-import org.grails.forge.BuildBuilder
-import org.grails.forge.application.generator.GeneratorContext
-import org.grails.forge.feature.Features
-import org.grails.forge.fixture.CommandOutputFixture
-
-class Neo4JGormSpec extends ApplicationContextSpec implements 
CommandOutputFixture {
-
-    void "test Mongo gorm features"() {
-        when:
-        Features features = getFeatures(['gorm-neo4j'])
-
-        then:
-        features.contains("gorm-neo4j")
-    }
-
-    void "test there can only be one of either MongoDB or Neo4j feature"() {
-        when:
-        getFeatures(beanContext.getBeansOfType(GormOneOfFeature)*.name)
-
-        then:
-        def ex = thrown(IllegalArgumentException)
-        ex.message.contains("There can only be one of the following features 
selected")
-    }
-
-    void "test dependencies are present for gradle"() {
-        when:
-        String template = new BuildBuilder(beanContext)
-                .features(["gorm-neo4j"])
-                .render()
-
-        then:
-        template.contains("implementation \"org.grails.plugins:neo4j\"")
-    }
-
-    void "test config"() {
-        when:
-        GeneratorContext ctx = buildGeneratorContext(['gorm-neo4j'])
-
-        then:
-        ctx.configuration.containsKey("grails.neo4j.type")
-        ctx.configuration.containsKey("grails.neo4j.location")
-    }
-
-
-}

Reply via email to