cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: [CXF-6541] update README and add a test features.xml for the simple setup
Date Mon, 24 Aug 2015 17:40:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 0813dee9c -> 9803ba7a3


[CXF-6541] update README and add a test features.xml for the simple setup


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9803ba7a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9803ba7a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9803ba7a

Branch: refs/heads/3.0.x-fixes
Commit: 9803ba7a34bc8601d0f39d798fb926f4e3adea67
Parents: 0813dee
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Mon Aug 24 19:27:35 2015 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Mon Aug 24 19:39:56 2015 +0200

----------------------------------------------------------------------
 .../jax_rs/description_swagger2_osgi/README.txt | 80 +++++++++++++++++++-
 .../src/test/features/features.xml              | 47 ++++++++++++
 distribution/src/main/release/samples/pom.xml   |  1 +
 3 files changed, 125 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9803ba7a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/README.txt
b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/README.txt
index 96c080c..e44e923 100644
--- a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/README.txt
@@ -6,6 +6,7 @@ using JAX-RS 2.0 (JSR-339). In this demo, the Swagger2Feature is configured
usin
 
 Building and running the demo
 ---------------------------------------
+(Note this demo currently uses the snapshot version of some componens)
 
 From the base directory of this sample (i.e., where this README file is
 located), the Maven pom.xml file can be used to build and run the demo. 
@@ -15,17 +16,90 @@ Using either UNIX or Windows:
 
   mvn install
 
-//TO-DO add karaf's intruction to run the demo
 
+Starting Karaf (refer to http://karaf.apache.org/manual/latest-3.0.x/quick-start.html)
 
-After installing this bundle on your Karaf instance, you will be able to find this service
at
+  bin/karaf
+
+
+          __ __                  ____      
+         / //_/____ __________ _/ __/      
+        / ,<  / __ `/ ___/ __ `/ /_        
+       / /| |/ /_/ / /  / /_/ / __/        
+      /_/ |_|\__,_/_/   \__,_/_/         
+  
+    Apache Karaf (3.0.4)
+  
+  Hit '<tab>' for a list of available commands
+  and '[cmd] --help' for help on a specific command.
+  Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+
+Install this demo feature using the local features.xml file located at src/test/features,
you
+can directly use this file or copy it to somewhere. Assuming you have this features.xml file
at
+/Users/me/work/cxf/samples/features.xml
+
+You can add this local feature url by typeing
+
+  karaf@root()> feature:repo-add file:///Users/me/work/cxf/samples/features.xml
+  Adding feature url file:///Users/me/work/cxf/samples/features.xml
+
+Now you can see the features defined in this features file.
+
+  karaf@root()> feature:list | grep demo
+  demo-swagger-core             | 1.0.0            |           | demo-cxf-swagger-sample-1.0.0
| 
+  demo-swagger-jaxrs            | 1.0.0            |           | demo-cxf-swagger-sample-1.0.0
| 
+  demo-cxf-swagger-jaxrs-sample | 1.0.0            |           | demo-cxf-swagger-sample-1.0.0
| 
+  karaf@root()> 
+
+Install the demo sample feature that transitively install other features and bundles that
are
+required to run this demo sample.
+
+  feature:install demo-cxf-swagger-jaxrs-sample
+
+You can verify if the CXF JAX-RS Swagger2 Blueprint Demo is installed and started.
+
+  karaf@root()> list 
+  START LEVEL 100 , List Threshold: 50
+   ID | State  | Lvl | Version          | Name                                       
+  -----------------------------------------------------------------------------------
+  107 | Active |  80 | 1.1.0.Final      | Bean Validation API                        
+  108 | Active |  80 | 3.4.0            | Apache Commons Lang                        
+  109 | Active |  80 | 2.4.6            | Jackson-core                               
+  110 | Active |  80 | 2.4.6            | Jackson-annotations                        
+  111 | Active |  80 | 2.4.6            | jackson-databind                           
+  112 | Active |  80 | 2.4.6            | Jackson-dataformat-YAML                    
+  113 | Active |  80 | 1.5.4.SNAPSHOT   | swagger-annotations                        
+  114 | Active |  80 | 1.5.4.SNAPSHOT   | swagger-models                             
+  115 | Active |  80 | 1.5.4.SNAPSHOT   | swagger-core                               
+  116 | Active |  80 | 18.0.0           | Guava: Google Core Libraries for Java      
+  117 | Active |  80 | 3.19.0.GA        | Javassist                                  
+  118 | Active |  80 | 0.9.9.2-SNAPSHOT | Apache ServiceMix :: Bundles :: reflections
+  119 | Active |  80 | 2.4.6            | Jackson-JAXRS-base                         
+  120 | Active |  80 | 2.4.6            | Jackson-JAXRS-JSON                         
+  121 | Active |  80 | 1.5.4.SNAPSHOT   | swagger-jaxrs                              
+  122 | Active |  80 | 3.1.3.SNAPSHOT   | CXF JAX-RS Swagger2 Blueprint Demo    
+  karaf@root()>
+
+
+Now, you will be able to access this CXF JAXRS demo service on your Karaf instance at
 
   http://localhost:8181/cxf/swaggerSample
 
-And its Swagger API documents in json or yaml are available at
+And its Swagger API documents in either json or yaml are available at
 
   http://localhost:8181/cxf/swaggerSample/swagger.json
   http://localhost:8181/cxf/swaggerSample/swagger.yaml
 
 
+If you do not have your swagger-ui on your local system, you can download 
+a copy from its download site.
+
+At the console, type
+
+  wget -N https://github.com/swagger-api/swagger-ui/archive/master.zip
+  unzip master.zip
 
+This will extract the content of the swagger-ui zip file. Using your Browser, open
+the index.html file at swagger-ui-master/dist/. Finally, type in the above swagger 
+document URL in the input field and click on "Explore" to view the document.

http://git-wip-us.apache.org/repos/asf/cxf/blob/9803ba7a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/src/test/features/features.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/src/test/features/features.xml
b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/src/test/features/features.xml
new file mode 100644
index 0000000..2b0fc11
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/src/test/features/features.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="demo-cxf-swagger-sample-1.0.0">
+    <repository>mvn:org.apache.cxf.karaf/apache-cxf/3.0.7-SNAPSHOT/xml/features</repository>
+
+    <!-- Note demo-swagger-core and demo-swagger-jaxrs features may be published by swagger
as
+         features swagger-core and swagger-jaxrs, respectively -->
+    <feature name="demo-swagger-core" version="1.0.0" resolver="(obr)">
+        <bundle dependency="true">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
+        <bundle dependency="true">mvn:org.apache.commons/commons-lang3/3.4</bundle>
+
+        <!-- jackson -->
+        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/2.4.6</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.6</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/2.4.6</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.4.6</bundle>
+
+        <!-- swagger -->
+        <bundle dependency="true">mvn:io.swagger/swagger-annotations/1.5.4-SNAPSHOT</bundle>
+        <bundle dependency="true">mvn:io.swagger/swagger-models/1.5.4-SNAPSHOT</bundle>
+        <bundle dependency="true">mvn:io.swagger/swagger-core/1.5.4-SNAPSHOT</bundle>
+    </feature>
+
+    <feature name="demo-swagger-jaxrs" version="1.0.0" resolver="(obr)">
+        <!-- this feature can work with jsr-311 or jsr-339, so let the jaxrs provider
decide which one install -->
+
+        <bundle dependency="true">mvn:com.google.guava/guava/18.0</bundle>
+        <bundle dependency="true">mvn:org.javassist/javassist/3.19.0-GA</bundle>
+        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/0.9.9_2-SNAPSHOT</bundle>
+
+        <!-- jackson -->
+        <bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.4.6</bundle>
+        <bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.4.6</bundle>
+
+        <!-- swagger -->
+        <bundle dependency="true">mvn:io.swagger/swagger-jaxrs/1.5.4-SNAPSHOT</bundle>
+    </feature>
+
+
+    <!-- this is the feature definition for this cxf jaxrs swagger blueprint sample demo
-->
+    <feature name="demo-cxf-swagger-jaxrs-sample" version="1.0.0" resolver="(obr)">
+        <feature version='[3.0,4)'>cxf-jaxrs</feature>
+        <feature version='1.0.0'>demo-swagger-core</feature>
+        <feature version='1.0.0'>demo-swagger-jaxrs</feature>
+
+        <bundle dependency="true">mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.0.7-SNAPSHOT</bundle>
+    </feature>
+</features>

http://git-wip-us.apache.org/repos/asf/cxf/blob/9803ba7a/distribution/src/main/release/samples/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index 4323fa1..f58b715 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -54,6 +54,7 @@
         <module>jax_rs/description_swagger</module>
         <module>jax_rs/description_swagger2</module>
         <module>jax_rs/description_swagger2_web</module>
+        <module>jax_rs/description_swagger2_osgi</module>
         <module>callback</module>
         <module>wsdl_first_pure_xml</module>
         <module>jaxws_dispatch_provider</module>


Mime
View raw message