You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2023/01/24 23:13:02 UTC

[sling-org-apache-sling-scripting-groovy] branch master updated: SLING-11761 Remove JsonBuilderBindingsValuesProvider

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new c9ea155  SLING-11761 Remove JsonBuilderBindingsValuesProvider
c9ea155 is described below

commit c9ea15578b341a027faf939c343419afbe3ae267
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Wed Jan 25 00:12:40 2023 +0100

    SLING-11761 Remove JsonBuilderBindingsValuesProvider
---
 pom.xml                                            |  6 ---
 .../JsonBuilderBindingsValuesProvider.java         | 48 ----------------------
 .../scripting/groovy/it/GroovyTestSupport.java     |  1 -
 3 files changed, 55 deletions(-)

diff --git a/pom.xml b/pom.xml
index bf105d4..ba7a63d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -239,12 +239,6 @@
       <version>${groovy.version}</version>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.groovy</groupId>
-      <artifactId>groovy-json</artifactId>
-      <version>${groovy.version}</version>
-      <scope>provided</scope>
-    </dependency>
     <dependency>
       <groupId>org.apache.groovy</groupId>
       <artifactId>groovy-templates</artifactId>
diff --git a/src/main/java/org/apache/sling/scripting/groovy/internal/JsonBuilderBindingsValuesProvider.java b/src/main/java/org/apache/sling/scripting/groovy/internal/JsonBuilderBindingsValuesProvider.java
deleted file mode 100644
index 1981756..0000000
--- a/src/main/java/org/apache/sling/scripting/groovy/internal/JsonBuilderBindingsValuesProvider.java
+++ /dev/null
@@ -1,48 +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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.sling.scripting.groovy.internal;
-
-import javax.script.Bindings;
-
-import groovy.json.JsonBuilder;
-import org.apache.sling.scripting.api.BindingsValuesProvider;
-import org.osgi.service.component.annotations.Component;
-
-/**
- * BindingsValuesProvider which binds an instance of JsonBuilder.
- */
-@Component(
-    immediate = true,
-    service = BindingsValuesProvider.class,
-    property = {
-        "javax.script.name=gstring",
-        "service.description=Groovy JsonBuilder BindingsValuesProvider",
-        "service.vendor=The Apache Software Foundation"
-    }
-)
-public final class JsonBuilderBindingsValuesProvider implements BindingsValuesProvider {
-
-    public JsonBuilderBindingsValuesProvider() { //
-    }
-
-    @Override
-    public void addBindings(final Bindings bindings) {
-        final JsonBuilder jsonBuilder = new JsonBuilder();
-        bindings.put("jsonBuilder", jsonBuilder);
-    }
-
-}
diff --git a/src/test/java/org/apache/sling/scripting/groovy/it/GroovyTestSupport.java b/src/test/java/org/apache/sling/scripting/groovy/it/GroovyTestSupport.java
index 87a0e5e..9b3e2fc 100644
--- a/src/test/java/org/apache/sling/scripting/groovy/it/GroovyTestSupport.java
+++ b/src/test/java/org/apache/sling/scripting/groovy/it/GroovyTestSupport.java
@@ -76,7 +76,6 @@ public class GroovyTestSupport extends TestSupport {
             // Sling Scripting Groovy
             testBundle("bundle.filename"),
             mavenBundle().groupId("org.apache.groovy").artifactId("groovy").versionAsInProject(),
-            mavenBundle().groupId("org.apache.groovy").artifactId("groovy-json").versionAsInProject(),
             mavenBundle().groupId("org.apache.groovy").artifactId("groovy-templates").versionAsInProject(),
             // testing
             slingResourcePresence(),