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

rombert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tooling-support-source.git

commit c343f5ad178b970a2e7a70bd9cf1a3e5981a51ac
Author: Karl Pauls <[email protected]>
AuthorDate: Thu Jun 1 20:09:54 2017 +0000

    SLING-6908: Remove commons.json from Tooling Support Source
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1797259 
13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                               | 19 +++++++++++++------
 .../support/source/impl/SourceReferencesServlet.java  | 13 ++++++-------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/pom.xml b/pom.xml
index 899c68c..d6089a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,13 @@
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Embed-Dependency>
+                            
org.apache.felix.utils;inline=org/apache/felix/utils/json/JSONWriter.class
+                        </Embed-Dependency>
+                    </instructions>
+                </configuration>
            </plugin>
         </plugins>
     </build>
@@ -55,6 +62,12 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.utils</artifactId>
+            <version>1.9.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.annotations</artifactId>
         </dependency>
         <dependency>
@@ -86,11 +99,5 @@
             <version>2.4</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.json</artifactId>
-            <version>2.0.6</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 </project>
diff --git 
a/src/main/java/org/apache/sling/tooling/support/source/impl/SourceReferencesServlet.java
 
b/src/main/java/org/apache/sling/tooling/support/source/impl/SourceReferencesServlet.java
index f19cdf7..a2c6454 100644
--- 
a/src/main/java/org/apache/sling/tooling/support/source/impl/SourceReferencesServlet.java
+++ 
b/src/main/java/org/apache/sling/tooling/support/source/impl/SourceReferencesServlet.java
@@ -37,8 +37,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.sling.commons.json.JSONException;
-import org.apache.sling.commons.json.io.JSONWriter;
+import org.apache.felix.utils.json.JSONWriter;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.wiring.BundleRevision;
@@ -141,12 +140,12 @@ public class SourceReferencesServlet extends HttpServlet {
             }
             
             w.endArray();
-        } catch (JSONException e) {
+        } catch (IOException e) {
             throw new ServletException(e);
         }
     }
 
-    private void collectMavenSourceReferences(JSONWriter w, Bundle bundle) 
throws IOException, JSONException {
+    private void collectMavenSourceReferences(JSONWriter w, Bundle bundle) 
throws IOException {
         
         Enumeration<?> entries = bundle.findEntries("/META-INF/maven", 
"pom.properties", true);
         
@@ -162,7 +161,7 @@ public class SourceReferencesServlet extends HttpServlet {
         }
     }
     
-    private void writeMavenGav(JSONWriter w, String groupId, String 
artifactId, String version) throws JSONException {
+    private void writeMavenGav(JSONWriter w, String groupId, String 
artifactId, String version) throws IOException {
         
         w.object();
         w.key(KEY_TYPE).value(VALUE_TYPE_MAVEN);
@@ -172,7 +171,7 @@ public class SourceReferencesServlet extends HttpServlet {
         w.endObject();
     }
     
-    private void writeMavenGav(JSONWriter w, InputStream in) throws 
IOException, JSONException {
+    private void writeMavenGav(JSONWriter w, InputStream in) throws 
IOException {
         
         Properties p = new Properties();
         p.load(in);
@@ -203,7 +202,7 @@ public class SourceReferencesServlet extends HttpServlet {
         return embeddedJars;
     }
     
-    private void collectMavenSourceRerefences(JSONWriter w, URL entry) throws 
IOException, JSONException {
+    private void collectMavenSourceRerefences(JSONWriter w, URL entry) throws 
IOException {
         
         InputStream wrappedIn = entry.openStream();
         try {

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to