karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [27/35] karaf-boot git commit: Remove start-ds as it already works with the main starter
Date Mon, 09 May 2016 14:48:46 GMT
Remove start-ds as it already works with the main starter


Project: http://git-wip-us.apache.org/repos/asf/karaf-boot/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-boot/commit/1d8892a2
Tree: http://git-wip-us.apache.org/repos/asf/karaf-boot/tree/1d8892a2
Diff: http://git-wip-us.apache.org/repos/asf/karaf-boot/diff/1d8892a2

Branch: refs/heads/master
Commit: 1d8892a27143e019756085ad6396856cb260e82a
Parents: 137222a
Author: Christian Schneider <chris@die-schneider.net>
Authored: Mon Apr 25 12:35:52 2016 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Mon Apr 25 12:35:52 2016 +0200

----------------------------------------------------------------------
 samples/ds/service-consumer/pom.xml             |  2 +-
 samples/ds/service-provider/pom.xml             |  2 +-
 starters/karaf-boot-starter-ds/pom.xml          | 52 --------------
 .../apache/karaf/boot/ds/impl/DsProcessor.java  | 72 --------------------
 .../javax.annotation.processing.Processor       |  1 -
 starters/karaf-boot-starter/pom.xml             |  5 ++
 starters/pom.xml                                |  3 +-
 7 files changed, 8 insertions(+), 129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/samples/ds/service-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/service-consumer/pom.xml b/samples/ds/service-consumer/pom.xml
index c6b85c0..3048e77 100644
--- a/samples/ds/service-consumer/pom.xml
+++ b/samples/ds/service-consumer/pom.xml
@@ -28,7 +28,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.karaf.boot</groupId>
-            <artifactId>karaf-boot-starter-ds</artifactId>
+            <artifactId>karaf-boot-starter</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/samples/ds/service-provider/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/service-provider/pom.xml b/samples/ds/service-provider/pom.xml
index 854a780..3340b34 100644
--- a/samples/ds/service-provider/pom.xml
+++ b/samples/ds/service-provider/pom.xml
@@ -28,7 +28,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.karaf.boot</groupId>
-            <artifactId>karaf-boot-starter-ds</artifactId>
+            <artifactId>karaf-boot-starter</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/starters/karaf-boot-starter-ds/pom.xml
----------------------------------------------------------------------
diff --git a/starters/karaf-boot-starter-ds/pom.xml b/starters/karaf-boot-starter-ds/pom.xml
deleted file mode 100644
index 331c8e2..0000000
--- a/starters/karaf-boot-starter-ds/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.boot</groupId>
-        <artifactId>karaf-boot-starters</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>karaf-boot-starter-ds</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
-            <version>${osgi.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <compilerArgument>-proc:none</compilerArgument>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/starters/karaf-boot-starter-ds/src/main/java/org/apache/karaf/boot/ds/impl/DsProcessor.java
----------------------------------------------------------------------
diff --git a/starters/karaf-boot-starter-ds/src/main/java/org/apache/karaf/boot/ds/impl/DsProcessor.java
b/starters/karaf-boot-starter-ds/src/main/java/org/apache/karaf/boot/ds/impl/DsProcessor.java
deleted file mode 100644
index 49baa70..0000000
--- a/starters/karaf-boot-starter-ds/src/main/java/org/apache/karaf/boot/ds/impl/DsProcessor.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.karaf.boot.ds.impl;
-
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.RoundEnvironment;
-import javax.lang.model.element.TypeElement;
-import javax.tools.Diagnostic.Kind;
-import javax.tools.FileObject;
-import javax.tools.StandardLocation;
-import java.io.CharArrayWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.HashSet;
-import java.util.Set;
-
-public class DsProcessor extends AbstractProcessor {
-
-    boolean hasRun;
-
-    public DsProcessor() {
-    }
-
-    @Override
-    public Set<String> getSupportedAnnotationTypes() {
-        Set<String> set = new HashSet<String>();
-        set.add(org.osgi.service.component.annotations.Component.class.getName());
-        return set;
-    }
-
-    @Override
-    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
roundEnv) {
-        if (!hasRun) {
-            hasRun = true;
-            // Add the Karaf embedded package
-            try (PrintWriter w = appendResource("META-INF/org.apache.karaf.boot.bnd")) {
-                w.println("_dsannotations: *");
-            } catch (Exception e) {
-                processingEnv.getMessager().printMessage(Kind.ERROR, "Error: " + e.getMessage());
-            }
-        }
-        return true;
-    }
-
-    private PrintWriter appendResource(String resource) throws IOException {
-        try {
-            FileObject o = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT,
"", resource);
-            return new PrintWriter(o.openWriter());
-        } catch (Exception e) {
-            try {
-                FileObject o = processingEnv.getFiler().getResource(StandardLocation.CLASS_OUTPUT,
"", resource);
-                CharArrayWriter baos = new CharArrayWriter();
-                try (Reader r = o.openReader(true)) {
-                    char[] buf = new char[4096];
-                    int l;
-                    while ((l = r.read(buf)) > 0) {
-                        baos.write(buf, 0, l);
-                    }
-                }
-                o.delete();
-                o = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT,
"", resource);
-                Writer w = o.openWriter();
-                w.write(baos.toCharArray());
-                return new PrintWriter(w);
-            } catch (Exception e2) {
-                e2.addSuppressed(e);
-                e2.printStackTrace();
-                throw e2;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/starters/karaf-boot-starter-ds/src/main/resources/META-INF/services/javax.annotation.processing.Processor
----------------------------------------------------------------------
diff --git a/starters/karaf-boot-starter-ds/src/main/resources/META-INF/services/javax.annotation.processing.Processor
b/starters/karaf-boot-starter-ds/src/main/resources/META-INF/services/javax.annotation.processing.Processor
deleted file mode 100644
index 11ef8af..0000000
--- a/starters/karaf-boot-starter-ds/src/main/resources/META-INF/services/javax.annotation.processing.Processor
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.karaf.boot.ds.impl.DsProcessor

http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/starters/karaf-boot-starter/pom.xml
----------------------------------------------------------------------
diff --git a/starters/karaf-boot-starter/pom.xml b/starters/karaf-boot-starter/pom.xml
index e5b2742..1c5380a 100644
--- a/starters/karaf-boot-starter/pom.xml
+++ b/starters/karaf-boot-starter/pom.xml
@@ -36,6 +36,11 @@
             <artifactId>org.osgi.core</artifactId>
             <version>${osgi.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+            <version>${osgi.version}</version>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-boot/blob/1d8892a2/starters/pom.xml
----------------------------------------------------------------------
diff --git a/starters/pom.xml b/starters/pom.xml
index 57dbd39..9a4adf1 100644
--- a/starters/pom.xml
+++ b/starters/pom.xml
@@ -34,7 +34,6 @@
     <modules>
         <module>karaf-boot-starter</module>
         <module>karaf-boot-starter-karaf</module>
-        <module>karaf-boot-starter-ds</module>
         <module>karaf-boot-starter-shell</module>
         <module>karaf-boot-starter-web</module>
         <module>karaf-boot-starter-jpa</module>
@@ -42,4 +41,4 @@
         <module>karaf-boot-starter-blueprint</module>
     </modules>
 
-</project>
\ No newline at end of file
+</project>


Mime
View raw message