aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csie...@apache.org
Subject [3/4] aries-jax-rs-whiteboard git commit: [JAXRS] fix examples
Date Fri, 30 Jun 2017 15:59:41 GMT
[JAXRS] fix examples

Signed-off-by: Raymond Auge <raymond.auge@liferay.com>


Project: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/commit/608d9cdf
Tree: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/tree/608d9cdf
Diff: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/diff/608d9cdf

Branch: refs/heads/master
Commit: 608d9cdf7ec8e5221eca88f231e07655bfd1c531
Parents: 9577e66
Author: Raymond Auge <raymond.auge@liferay.com>
Authored: Thu Jun 29 14:01:03 2017 -0400
Committer: Raymond Auge <raymond.auge@liferay.com>
Committed: Fri Jun 30 09:50:08 2017 -0400

----------------------------------------------------------------------
 jax-rs.example/example.bndrun                   | 49 +++++++--------
 jax-rs.example/pom.xml                          | 63 ++++++++++++++++----
 .../aries/jax/rs/example/ExampleAddon.java      |  7 ++-
 .../jax/rs/example/ExampleApplication.java      |  7 ++-
 .../aries/jax/rs/example/ExampleFilter.java     |  7 ++-
 pom.xml                                         | 14 +++++
 6 files changed, 105 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/608d9cdf/jax-rs.example/example.bndrun
----------------------------------------------------------------------
diff --git a/jax-rs.example/example.bndrun b/jax-rs.example/example.bndrun
index 539323a..4a0a84a 100644
--- a/jax-rs.example/example.bndrun
+++ b/jax-rs.example/example.bndrun
@@ -1,48 +1,49 @@
 -standalone: ${.}/target/index.xml
--include: ${.}/augments.bnd
+#-include: ${.}/augments.bnd
 -resourceonly: true
 
 -runrequires: \
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.example)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.whiteboard)',\
+	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.jline)',\
 	osgi.identity;filter:='(osgi.identity=slf4j.log4j12)'
 
 -runfw: org.eclipse.osgi;version='[3.10.100.v20150529-1857,3.10.100.v20150529-1857]'
+
+-runee: JavaSE-1.8
+-resolve.effective: resolve, active
+-runproperties: \
+	log4j.configuration=file:${.}/log4j.properties,\
+	osgi.console.enable.builtin=false, \
+	osgi.console=, \
+	org.osgi.service.http.port=8080
+-runsystemcapabilities: ${native_capability}
+-runblacklist:\
+	osgi.identity;filter:='(osgi.identity=org.osgi.compendium)',\
+	osgi.identity;filter:='(osgi.identity=osgi.cmpn)'
+
 -runbundles: \
 	javax.annotation-api;version='[1.2.0,1.2.1)',\
 	javax.json-api;version='[1.0.0,1.0.1)',\
-	javax.ws.rs-api;version='[2.0.1,2.0.2)',\
 	log4j;version='[1.2.17,1.2.18)',\
 	org.apache.aries.jax.rs.example;version='[0.0.1,0.0.2)',\
+	org.apache.aries.jax.rs.jaxrs.api;version='[0.0.1,0.0.2)',\
 	org.apache.aries.jax.rs.whiteboard;version='[0.0.1,0.0.2)',\
-	org.apache.felix.bundlerepository;version='[1.6.0,1.6.1)',\
+	org.apache.felix.configadmin;version='[1.8.14,1.8.15)',\
 	org.apache.felix.eventadmin;version='[1.4.8,1.4.9)',\
-	org.apache.felix.gogo.command;version='[1.0.0,1.0.1)',\
-	org.apache.felix.gogo.jline;version='[1.0.0,1.0.1)',\
-	org.apache.felix.gogo.runtime;version='[1.0.0,1.0.1)',\
-	org.apache.felix.http.api;version='[3.0.0,3.0.1)',\
+	org.apache.felix.gogo.command;version='[1.0.2,1.0.3)',\
+	org.apache.felix.gogo.jline;version='[1.0.6,1.0.7)',\
+	org.apache.felix.gogo.runtime;version='[1.0.6,1.0.7)',\
 	org.apache.felix.http.jetty;version='[3.4.0,3.4.1)',\
 	org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
 	org.apache.felix.scr;version='[2.0.8,2.0.9)',\
 	org.apache.ws.xmlschema.core;version='[2.2.1,2.2.2)',\
-	org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\
-	org.jline;version='[3.0.0,3.0.1)',\
+	org.jline;version='[3.2.0,3.2.1)',\
 	org.objectweb.asm;version='[5.0.4,5.0.5)',\
-	org.osgi.service.cm;version='[1.5.0,1.5.1)',\
-	org.osgi.service.metatype;version='[1.3.0,1.3.1)',\
+	org.osgi.service.http;version='[1.2.1,1.2.2)',\
+	org.osgi.service.jaxrs;version='[1.0.0,1.0.1)',\
+	org.osgi.util.function;version='[1.1.0,1.1.1)',\
+	org.osgi.util.promise;version='[1.1.0,1.1.1)',\
 	slf4j.api;version='[1.7.21,1.7.22)',\
 	slf4j.log4j12;version='[1.6.1,1.6.2)'
-
--runee: JavaSE-1.8
--resolve.effective: resolve, active
--runproperties: \
-	log4j.configuration=file:${.}/log4j.properties,\
-	osgi.console.enable.builtin=false, \
-	osgi.console=, \
-	org.osgi.service.http.port=8080
--runsystemcapabilities: ${native_capability}
--runblacklist:\
-	osgi.identity;filter:='(osgi.identity=org.osgi.compendium)',\
-	osgi.identity;filter:='(osgi.identity=osgi.cmpn)'
-

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/608d9cdf/jax-rs.example/pom.xml
----------------------------------------------------------------------
diff --git a/jax-rs.example/pom.xml b/jax-rs.example/pom.xml
index 21eef6d..128f20f 100644
--- a/jax-rs.example/pom.xml
+++ b/jax-rs.example/pom.xml
@@ -83,19 +83,30 @@
             <version>1.6.1</version>
         </dependency>
         <dependency>
-            <groupId>javax.json</groupId>
-            <artifactId>javax.json-api</artifactId>
-            <version>1.0</version>
-        </dependency>
-        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.core</artifactId>
             <version>6.0.0</version>
         </dependency>
         <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>javax.annotation-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.json</groupId>
+            <artifactId>javax.json-api</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.aries.jax.rs</groupId>
-            <artifactId>org.apache.aries.jax.rs.log4j-configuration</artifactId>
+            <artifactId>org.apache.aries.jax.rs.jaxrs.api</artifactId>
             <version>0.0.1-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.servicemix.specs</groupId>
+                    <artifactId>org.apache.servicemix.specs.jsr339-api-2.0.1</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.jax.rs</groupId>
@@ -104,6 +115,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.8.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.eventadmin</artifactId>
             <version>1.4.8</version>
         </dependency>
@@ -120,12 +136,17 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.gogo.command</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.2</version>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.gogo.jline</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.gogo.runtime</artifactId>
+            <version>1.0.6</version>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
@@ -133,6 +154,11 @@
             <version>2.0.8</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.ws.xmlschema</groupId>
+            <artifactId>xmlschema-core</artifactId>
+            <version>2.2.1</version>
+        </dependency>
+        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.eclipse.equinox.metatype</artifactId>
             <version>1.4.100.v20150408-1437</version>
@@ -153,9 +179,24 @@
             <version>1.3.0</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.jax.rs</groupId>
-            <artifactId>javax.ws.rs_2.0</artifactId>
-            <version>0.0.1-SNAPSHOT</version>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.util.function</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.jaxrs</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.util.promise</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm</artifactId>
+            <version>5.0.4</version>
         </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/608d9cdf/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleAddon.java
----------------------------------------------------------------------
diff --git a/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleAddon.java
b/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleAddon.java
index 0be9571..d2646dd 100644
--- a/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleAddon.java
+++ b/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleAddon.java
@@ -18,6 +18,7 @@
 package org.apache.aries.jax.rs.example;
 
 import org.osgi.service.component.annotations.Component;
+import org.osgi.service.jaxrs.whiteboard.JaxRSWhiteboardConstants;
 
 import javax.annotation.PostConstruct;
 import javax.ws.rs.GET;
@@ -27,8 +28,10 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.UriInfo;
 
 @Component(
-    immediate = true,
-    property = "osgi.jaxrs.resource.base=/examples/example-addon",
+    property = {
+        JaxRSWhiteboardConstants.JAX_RS_APPLICATION_SELECT + "=(osgi.jaxrs.name=example-application)",
+        JaxRSWhiteboardConstants.JAX_RS_RESOURCE + "=true"
+    },
     service = ExampleAddon.class
 )
 public class ExampleAddon {

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/608d9cdf/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleApplication.java
----------------------------------------------------------------------
diff --git a/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleApplication.java
b/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleApplication.java
index 6148beb..a38c430 100644
--- a/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleApplication.java
+++ b/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleApplication.java
@@ -18,6 +18,7 @@
 package org.apache.aries.jax.rs.example;
 
 import org.osgi.service.component.annotations.Component;
+import org.osgi.service.jaxrs.whiteboard.JaxRSWhiteboardConstants;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Produces;
@@ -26,8 +27,10 @@ import java.util.Collections;
 import java.util.Set;
 
 @Component(
-    immediate = true,
-    property = "osgi.jaxrs.application.base=/example-application",
+    property = {
+        JaxRSWhiteboardConstants.JAX_RS_APPLICATION_BASE + "=/example-application",
+        JaxRSWhiteboardConstants.JAX_RS_NAME + "=example-application"
+    },
     service = Application.class
 )
 public class ExampleApplication extends Application {

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/608d9cdf/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleFilter.java
----------------------------------------------------------------------
diff --git a/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleFilter.java
b/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleFilter.java
index 48425f3..fb051f0 100644
--- a/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleFilter.java
+++ b/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example/ExampleFilter.java
@@ -18,6 +18,7 @@
 package org.apache.aries.jax.rs.example;
 
 import org.osgi.service.component.annotations.Component;
+import org.osgi.service.jaxrs.whiteboard.JaxRSWhiteboardConstants;
 
 import javax.ws.rs.container.ContainerRequestContext;
 import javax.ws.rs.container.ContainerRequestFilter;
@@ -25,10 +26,10 @@ import javax.ws.rs.ext.Provider;
 import java.io.IOException;
 
 @Component(
-    immediate = true,
     property = {
-        "jaxrs.application.select=(component.name=org.apache.aries.jax.rs.example.ExampleApplication)",
-        "osgi.jaxrs.filter.base=/examples"
+        "osgi.jaxrs.filter.base=/examples",
+        JaxRSWhiteboardConstants.JAX_RS_APPLICATION_SELECT + "=(osgi.jaxrs.name=example-application)",
+        JaxRSWhiteboardConstants.JAX_RS_EXTENSION + "=true"
     }
 )
 @Provider

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/608d9cdf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index def5ee6..1391f26 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,6 +112,20 @@
                 </plugin>
                 <plugin>
                     <groupId>biz.aQute.bnd</groupId>
+                    <artifactId>bnd-resolver-maven-plugin</artifactId>
+                    <version>${bnd.version}</version>
+                    <executions>
+                        <execution>
+                            <id>resolve</id>
+                            <goals>
+                                <goal>resolve</goal>
+                            </goals>
+                            <phase>package</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>biz.aQute.bnd</groupId>
                     <artifactId>bnd-maven-plugin</artifactId>
                     <version>${bnd.version}</version>
                     <executions>


Mime
View raw message