brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [08/21] incubator-brooklyn git commit: [BROOKLYN-183] Deploy brooklyn-rest-server using pax-web war extender
Date Wed, 25 Nov 2015 01:55:18 GMT
[BROOKLYN-183] Deploy brooklyn-rest-server using pax-web war extender

This brings brooklyn's REST API online within karaf using jersey.


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/c718ff35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/c718ff35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/c718ff35

Branch: refs/heads/master
Commit: c718ff353bcda43028c6c3dac8dc4a0c50bd12b9
Parents: f154e03
Author: Ciprian Ciubotariu <cheepeero@gmx.net>
Authored: Wed Nov 18 01:31:24 2015 +0200
Committer: Ciprian Ciubotariu <cheepeero@gmx.net>
Committed: Wed Nov 18 01:31:49 2015 +0200

----------------------------------------------------------------------
 karaf/features/src/main/feature/feature.xml     | 22 +++++++++---
 .../features/src/main/history/dependencies.xml  | 16 ++++++---
 usage/rest-server/pom.xml                       | 37 ++++++++++++++++++++
 3 files changed, 66 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c718ff35/karaf/features/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/karaf/features/src/main/feature/feature.xml b/karaf/features/src/main/feature/feature.xml
index 0962e2f..46f7a0e 100644
--- a/karaf/features/src/main/feature/feature.xml
+++ b/karaf/features/src/main/feature/feature.xml
@@ -22,6 +22,10 @@
     <repository>mvn:org.apache.karaf.features/enterprise/${karaf.version}/xml/features</repository>
     <repository>mvn:org.apache.karaf.features/spring/${karaf.version}/xml/features</repository>
 
+    <!-- all these are about jax-rs, and will need some love later on -->
+    <!--<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr339-api-2.0/2.4.0</bundle>-->
+    <!--<bundle dependency="true">mvn:javax.ws.rs/jsr311-api/${jsr311-api.version}</bundle>-->
+    <!--<bundle dependency="true">mvn:javax.ws.rs/javax.ws.rs-api/${javax.ws.rs-api}</bundle>-->
 
     <feature name="swagger" version="${swagger.version}" description="Swagger Annotations+Core+JAXRS+Models">
         <bundle>mvn:io.swagger/swagger-annotations/${swagger.version}</bundle>
@@ -49,8 +53,11 @@
         <bundle dependency="true">mvn:com.google.guava/guava/${guava.version}</bundle>
         <bundle dependency="true">mvn:org.codehaus.groovy/groovy-all/${groovy.version}</bundle>
         <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
+        <bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
         <bundle dependency="true">mvn:org.slf4j/jul-to-slf4j/${slf4j.version}</bundle>
         <bundle dependency="true">mvn:org.yaml/snakeyaml/${snakeyaml.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/${httpclient.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
 
         <bundle dependency="true">mvn:ch.qos.logback/logback-classic/${logback.version}</bundle>
         <bundle dependency="true">mvn:ch.qos.logback/logback-core/${logback.version}</bundle>
@@ -67,13 +74,14 @@
 
         <bundle>mvn:org.apache.brooklyn/brooklyn-utils-rest-swagger/${project.version}</bundle>
 
-        <!-- TODO: jersey osgi feature -->
+        <!--<feature>jersey</feature>-->
         <bundle dependency="true">mvn:com.sun.jersey/jersey-server/${jersey.version}</bundle>
         <bundle dependency="true">mvn:com.sun.jersey/jersey-core/${jersey.version}</bundle>
         <bundle dependency="true">mvn:com.sun.jersey/jersey-servlet/${jersey.version}</bundle>
         <bundle dependency="true">mvn:org.apache.commons/commons-lang3/${commons-lang3.version}</bundle>
-        <bundle dependency="true">mvn:javax.servlet/javax.servlet-api/${javax-servlet.version}</bundle>
 
+        <bundle dependency="true">mvn:javax.servlet/javax.servlet-api/${javax-servlet.version}</bundle>
+        <bundle dependency="true">mvn:javax.ws.rs/jsr311-api/${jsr311-api.version}</bundle>
     </feature>
 
     <feature name="brooklyn-rest-api" version="${project.version}" description="Brooklyn
REST API">
@@ -95,6 +103,7 @@
         <bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
         <bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</bundle>
 
+        <!--<bundle dependency="true">mvn:javax.ws.rs/jsr311-api/${jsr311-api.version}</bundle>-->
         <bundle dependency="true">mvn:javax.servlet/javax.servlet-api/${javax-servlet.version}</bundle>
     </feature>
 
@@ -125,8 +134,6 @@
         <bundle dependency="true">mvn:org.bouncycastle/bcpkix-jdk15on/${bouncycastle.version}</bundle>
         <bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
         <bundle dependency="true">mvn:org.apache.commons/commons-lang3/${commons-lang3.version}</bundle>
-        <bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/${httpclient.version}</bundle>
-        <bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
         <bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
         <bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</bundle>
         <bundle dependency="true">mvn:org.codehaus.jackson/jackson-jaxrs/${jackson.version}</bundle>
@@ -173,6 +180,13 @@
         <feature>brooklyn-rest-api</feature>
         <feature>brooklyn-camp-brooklyn</feature>
         <feature>brooklyn-camp-base</feature>
+
+        <feature>war</feature>
+
+        <!--<feature>jersey</feature>-->
+        <bundle dependency="true">mvn:com.sun.jersey/jersey-server/${jersey.version}</bundle>
+        <bundle dependency="true">mvn:com.sun.jersey/jersey-core/${jersey.version}</bundle>
+        <bundle dependency="true">mvn:com.sun.jersey/jersey-servlet/${jersey.version}</bundle>
     </feature>
 
     <feature name="brooklyn-jsgui" version="${project.version}" description="Brooklyn
REST JavaScript Web GUI">

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c718ff35/karaf/features/src/main/history/dependencies.xml
----------------------------------------------------------------------
diff --git a/karaf/features/src/main/history/dependencies.xml b/karaf/features/src/main/history/dependencies.xml
index d48f69a..1417ea8 100644
--- a/karaf/features/src/main/history/dependencies.xml
+++ b/karaf/features/src/main/history/dependencies.xml
@@ -19,6 +19,7 @@
         <feature prerequisite="false" dependency="false">jetty</feature>
         <feature prerequisite="false" dependency="false">swagger</feature>
         <feature prerequisite="false" dependency="false">war</feature>
+        <feature prerequisite="false" dependency="false">war</feature>
         <bundle>mvn:ch.qos.logback/logback-classic/1.0.7</bundle>
         <bundle>mvn:ch.qos.logback/logback-core/1.0.7</bundle>
         <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.5</bundle>
@@ -33,14 +34,18 @@
         <bundle>mvn:com.google.code.gson/gson/2.3</bundle>
         <bundle>mvn:com.google.guava/guava/17.0</bundle>
         <bundle>mvn:com.jayway.jsonpath/json-path/2.0.0</bundle>
-        <bundle>mvn:com.sun.jersey.contribs/jersey-multipart/1.18.1</bundle>
-        <bundle>mvn:com.sun.jersey/jersey-core/1.18.1</bundle>
-        <bundle>mvn:com.sun.jersey/jersey-server/1.18.1</bundle>
-        <bundle>mvn:com.sun.jersey/jersey-servlet/1.18.1</bundle>
-        <bundle>mvn:com.sun.jersey/jersey-servlet/1.18.1</bundle>
+        <bundle>mvn:com.sun.jersey.contribs/jersey-multipart/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-core/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-core/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-server/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-server/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-servlet/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-servlet/1.19</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-servlet/1.19</bundle>
         <bundle>mvn:com.thoughtworks.xstream/xstream/1.4.7</bundle>
         <bundle>mvn:commons-beanutils/commons-beanutils/1.9.1</bundle>
         <bundle>mvn:commons-codec/commons-codec/1.9</bundle>
+        <bundle>mvn:commons-codec/commons-codec/1.9</bundle>
         <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>
         <bundle>mvn:commons-io/commons-io/2.4</bundle>
         <bundle>mvn:commons-lang/commons-lang/2.4</bundle>
@@ -48,6 +53,7 @@
         <bundle>mvn:io.swagger/swagger-models/1.5.3</bundle>
         <bundle>mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
         <bundle>mvn:javax.servlet/javax.servlet-api/3.1.0</bundle>
+        <bundle>mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
         <bundle>mvn:net.minidev/asm/1.0.2</bundle>
         <bundle>mvn:net.minidev/json-smart/2.1.1</bundle>
         <bundle>mvn:net.schmizz/sshj/0.8.1</bundle>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c718ff35/usage/rest-server/pom.xml
----------------------------------------------------------------------
diff --git a/usage/rest-server/pom.xml b/usage/rest-server/pom.xml
index 251c6fb..d343bfe 100644
--- a/usage/rest-server/pom.xml
+++ b/usage/rest-server/pom.xml
@@ -241,9 +241,46 @@
                 <!-- Required to set values in build-metadata.properties -->
                 <filtering>true</filtering>
             </resource>
+            <resource>
+                <directory>${basedir}/src/main/webapp</directory>
+            </resource>
         </resources>
         <plugins>
 
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <!-- configure plugin to generate MANIFEST.MF
+                     adapted from http://blog.knowhowlab.org/2010/06/osgi-tutorial-from-project-structure-to.html
-->
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <supportedProjectTypes>
+                        <supportedProjectType>jar</supportedProjectType>
+                    </supportedProjectTypes>
+                    <instructions>
+                        <Import-Package>
+                            com.sun.jersey.spi.container.servlet;version="[1.18.1,2.0)",
+                            *
+                        </Import-Package>
+                        <Export-Package>org.apache.brooklyn.*</Export-Package>
+                        <Implementation-SHA-1>${buildNumber}</Implementation-SHA-1>
+                        <Implementation-Branch>${scmBranch}</Implementation-Branch>
+                        <Web-ContextPath>/</Web-ContextPath>
+                        <_wab>src/main/webapp</_wab>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+
 <!-- if you want to build a WAR, full or skinny:
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>


Mime
View raw message