You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by CMoH <gi...@git.apache.org> on 2015/11/19 13:04:19 UTC

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

GitHub user CMoH opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048

    Brooklyn OSGification - step 2 (brooklyn-rest-server and jsgui)

    This is still work in progress, but I've decided to make the PR earlier on to achieve a quicker review process.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/CMoH/incubator-brooklyn karaf-container-2-jersey

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/1048.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1048
    
----
commit 9b633bd7d3f2a1202b4ed8d2be290a6939925957
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-10-16T09:41:06Z

    [BROOKLYN-183] Karaf feature for brooklyn-rest-api

commit badf6df4283833ab217eb98595deb432a60c96fb
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-10-30T22:30:08Z

    [BROOKLYN-183] Finished karaf feature brooklyn-camp-server

commit 05a2c5fc3d092cf92c33f14606cfdaf639a65466
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-06T13:56:38Z

    [BROOKLYN-183] Finalize feature brooklyn-rest-server

commit 7b5e39b07323367c32a7387690624c70f1c624fe
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-12T16:06:57Z

    [BROOKLYN-183] Add WAB manifest headers for brooklyn-jsgui
    
    Enable pax-web WAR Extender to find and automatically install the web
    application into the web container.

commit 25dde5e2c195520c3d831ecde911ab54b66f032b
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-12T16:10:20Z

    [BROOKLYN-183] Karaf feature for brooklyn-jsgui

commit 094e6e47d8fa1f040469e50f35ec62eac7191c86
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-16T15:20:42Z

    [BROOKLYN-183] Bump karaf to version 4.0.3

commit f154e0334e13077611e891a59b46c5155870b446
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-17T22:30:31Z

    [BROOKLYN-183] Bump jersey version to 1.19
    
    jersey-core-1.18.1 suffers from the split-package problem by providing
    javax.ws.rs*, which can affect OSGi bundle resolution

commit c718ff353bcda43028c6c3dac8dc4a0c50bd12b9
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-17T23:31:24Z

    [BROOKLYN-183] Deploy brooklyn-rest-server using pax-web war extender
    
    This brings brooklyn's REST API online within karaf using jersey.

commit c61f719a50d10908e2c2dd4a3b4539173d540ae6
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-18T15:51:29Z

    [BROOKLYN-185] Inline swagger-core and swagger-jaxrs into brooklyn-utils-rest-swagger
    
    swagger-core and swagger-jaxrs versions 1.5.3 have package
    io.swagger.config, which leads to a split-package situation.
    The selected workaround is to inline both these dependencies into
    brooklyn-utils-rest-swagger and re-export them for higher level client
    code. When brooklyn moves to guava-18.0 we can migrate to swagger 1.5.4,
    which are properly bundled.

commit ed6f1df199c268fdf2811abd15a3de967840b1ee
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-19T10:27:39Z

    [BROOKLYN-183] Fix detection of OSGi framework
    
    Fix the code detecting if we are running within an OSGi framework.

commit d5e216f007bc2387bc1f01af3ef7a2b02951c155
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-19T10:41:42Z

    [BROOKLYN-183] Publish the management context as an OSGi service

commit cbb58baab12556ac53458f7b539c0c8a761e2e69
Author: Ciprian Ciubotariu <ch...@gmx.net>
Date:   2015-11-19T10:52:08Z

    [BROOKLYN-183] Allow spring-like injection of management context
    
    Allow 3rd party libs to inject the managment context into various
    objects by renaming MagementContextInjectable.injectManagementContext()
    to setManagementContext().

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45800829
  
    --- Diff: karaf/pom.xml ---
    @@ -30,18 +30,24 @@
       <packaging>pom</packaging>
     
       <properties>
    -    <karaf.version>4.0.2</karaf.version>
    +    <karaf.version>4.0.3</karaf.version>
     
         <org.osgi.core.version>6.0.0</org.osgi.core.version>
         <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version>
         
         <lifecycle-mapping-plugin.version>1.0.0</lifecycle-mapping-plugin.version>
     
    +    <javax-servlet-api.version>3.1.0</javax-servlet-api.version>
    --- End diff --
    
    Addressed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45797624
  
    --- Diff: karaf/features/src/main/history/dependencies.xml ---
    @@ -2,46 +2,102 @@
     <features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="org.apache.brooklyn-0.9.0-SNAPSHOT">
         <feature version="0.0.0">
             <feature prerequisite="false" dependency="false">brooklyn-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-brooklyn</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-core</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-core</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-rest-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
             <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
             <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
    +        <feature prerequisite="false" dependency="false">jetty</feature>
    +        <feature prerequisite="false" dependency="false">swagger-crippled</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>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.5</bundle>
             <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.5</bundle>
             <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.4.5</bundle>
             <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.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>
    +        <bundle>mvn:io.swagger/swagger-annotations/1.5.3</bundle>
    +        <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>
    +        <bundle>mvn:org.apache.brooklyn.camp/camp-base/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn.camp/camp-server/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-api/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-camp/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-commands/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-core/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-jsgui/0.9.0-SNAPSHOT/war</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-logback-includes/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-rest-api/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-rest-server/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-rt-osgi/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-groovy/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-utils-rest-swagger/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.commons/commons-compress/1.4</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
             <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
             <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.4.1</bundle>
             <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle>
             <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2</bundle>
    +        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/0.9.9_1</bundle>
             <bundle>mvn:org.bouncycastle/bcpkix-jdk15on/1.49</bundle>
             <bundle>mvn:org.bouncycastle/bcprov-ext-jdk15on/1.49</bundle>
             <bundle>mvn:org.codehaus.groovy/groovy-all/2.3.7</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-jaxrs/1.9.13</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
             <bundle>mvn:org.freemarker/freemarker/2.3.22</bundle>
    +        <bundle>mvn:org.jvnet.mimepull/mimepull/1.9.3</bundle>
             <bundle>mvn:org.slf4j/jul-to-slf4j/1.6.6</bundle>
             <bundle>mvn:org.yaml/snakeyaml/1.11</bundle>
             <bundle>wrap:mvn:com.google.http-client/google-http-client/1.18.0-rc</bundle>
             <bundle>wrap:mvn:com.maxmind.geoip2/geoip2/0.8.1</bundle>
    -        <bundle>wrap:mvn:org.reflections/reflections/0.9.9-RC1</bundle>
    +        <bundle>wrap:mvn:javax.validation/validation-api/1.1.0.Final</bundle>
    +        <bundle>wrap:mvn:org.tukaani/xz/1.4</bundle>
    --- End diff --
    
    It is needed for strict dependency control, if wanted. There are some flags in the pom that control if this is generated, or whether to warn/fail if dependencies change. Just ignore it for the moment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45789547
  
    --- Diff: 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>
    --- End diff --
    
    I believe the `Implementation-` related props (and any other not changed) will be inherited from parent config?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45797827
  
    --- Diff: usage/camp/pom.xml ---
    @@ -186,6 +186,23 @@
         <build>
             <plugins>
     
    +            <plugin>
    +                <groupId>org.apache.felix</groupId>
    +                <artifactId>maven-bundle-plugin</artifactId>
    +                <configuration>
    +                    <supportedProjectTypes>
    +                        <supportedProjectType>jar</supportedProjectType>
    +                    </supportedProjectTypes>
    +                    <instructions>
    +                        <Export-Package>org.apache.brooklyn.*</Export-Package>
    +                        <Import-Package>
    +                            !org.python.google.common.collect
    --- End diff --
    
    So far it seems to be because of winrm. Will be dropped once references to winrm are  contained in brooklyn-software-winrm, for instance.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by hzbarcea <gi...@git.apache.org>.
Github user hzbarcea commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-159376853
  
    Thanks @CMoH , I'll review and test this evening.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by hzbarcea <gi...@git.apache.org>.
Github user hzbarcea commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-158831369
  
    @CMoH I looked into this this weekend, builds ok, tests work, webui works with the old launcher.
    
    However the karaf tests gave the following trace:
    ```
    org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=brooklyn-rest-server; type=karaf.feature; version="[0.9.0.SNAPSHOT,0.9.0.SNAPSHOT]"; filter:="(&(osgi.identity=brooklyn-rest-server)(type=karaf.feature)(version>=0.9.0.SNAPSHOT)(version<=0.9.0.SNAPSHOT))" [caused by: Unable to resolve brooklyn-rest-server/0.9.0.SNAPSHOT: missing requirement [brooklyn-rest-server/0.9.0.SNAPSHOT] osgi.identity; osgi.identity=org.apache.brooklyn.rest-server; type=osgi.bundle; version="[0.9.0.SNAPSHOT,0.9.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve org.apache.brooklyn.rest-server/0.9.0.SNAPSHOT: missing requirement [org.apache.brooklyn.rest-server/0.9.0.SNAPSHOT] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.apache.brooklyn.camp.brooklyn)(version>=0.9.0)(!(version>=1.0.0)))" [caused by: Unable to resolve org.apache.brooklyn.camp/0.9.0.SNAPSHOT: missing requirement [org.apache.brooklyn.camp/0.9
 .0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.python.google.common.collect)"]]]
            at org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)[org.apache.felix.framework-5.4.0.jar:]
            at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:235)[org.apache.felix.framework-5.4.0.jar:]
            at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)[org.apache.felix.framework-5.4.0.jar:]
            at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:220)[7:org.apache.karaf.features.core:4.0.3]
            at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[7:org.apache.karaf.features.core:4.0.3]
            at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[7:org.apache.karaf.features.core:4.0.3]
            at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[7:org.apache.karaf.features.core:4.0.3]
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_80]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_80]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_80]
            at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]
    ```
    Is this still WIP?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by hzbarcea <gi...@git.apache.org>.
Github user hzbarcea commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-159455334
  
    Reviewed, tested, manually tested the launcher and the ui. Looks good, merging. Thanks @CMoH and @neykov .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45797680
  
    --- Diff: karaf/pom.xml ---
    @@ -30,18 +30,24 @@
       <packaging>pom</packaging>
    --- End diff --
    
    Yes. @hzbarcea can provide more details.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45801898
  
    --- Diff: core/src/main/resources/OSGI-INF/blueprint/blueprint.xml ---
    @@ -0,0 +1,41 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +Copyright 2015 The Apache Software Foundation.
    +
    +Licensed 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.
    +-->
    +
    +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    +           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    +           xsi:schemaLocation="
    +             http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
    +             http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
    +             ">
    +
    +<!--    <cm:property-placeholder persistent-id="org.apache.brooklyn.properties" update-strategy="reload">
    +        <cm:default-properties>
    +            <cm:property name="some-property" value="${karaf.data}/some-path"/>
    +        </cm:default-properties>
    +    </cm:property-placeholder>-->
    +
    +    <bean id="localManagementContextService"
    +          class="org.apache.brooklyn.core.mgmt.internal.LocalManagementContext" />
    --- End diff --
    
    You are correct. The concept is that when brooklyn-core bundle is started, these beans get instantiated and they are up and running, and initialized via properties defined as in the commented section above. Later on one can install brooklyn-rest-server, therefore attaching the REST server to the mix, or choose to just leave brooklyn-core running to manage services etc.
    
    For this reason the initialization sequence will certainly be different than that in `BrooklynLauncher`, but in the end achieve the same effect. For now I have not gotten on that road yet.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45800896
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/osgi/Osgis.java ---
    @@ -338,12 +336,12 @@ public static Framework getFramework(String felixCacheDir, boolean clean) {
          * @param framework
          */
         public static void ungetFramework(Framework framework) {
    -        final Bundle frameworkBundle = FrameworkUtil.getBundle(Framework.class);
    -        if (frameworkBundle != null) {
    -            // already running inside an OSGi container
    -            final BundleContext ctx = frameworkBundle.getBundleContext();
    -            final ServiceReference<?> ref = ctx.getServiceReference(Framework.class);
    -            ctx.ungetService(ref);
    +        final Bundle bundle = FrameworkUtil.getBundle(Osgis.class);
    +        if (bundle != null) {
    +//            // already running inside an OSGi container
    +//            final BundleContext ctx = bundle.getBundleContext();
    +//            final ServiceReference<Framework> ref = ctx.getServiceReference(Framework.class);
    +//            ctx.ungetService(ref);
    --- End diff --
    
    Removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by hzbarcea <gi...@git.apache.org>.
Github user hzbarcea commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45818882
  
    --- Diff: karaf/features/src/main/history/dependencies.xml ---
    @@ -2,46 +2,102 @@
     <features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="org.apache.brooklyn-0.9.0-SNAPSHOT">
         <feature version="0.0.0">
             <feature prerequisite="false" dependency="false">brooklyn-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-brooklyn</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-core</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-core</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-rest-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
             <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
             <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
    +        <feature prerequisite="false" dependency="false">jetty</feature>
    +        <feature prerequisite="false" dependency="false">swagger-crippled</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>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.5</bundle>
             <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.5</bundle>
             <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.4.5</bundle>
             <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.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>
    +        <bundle>mvn:io.swagger/swagger-annotations/1.5.3</bundle>
    +        <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>
    +        <bundle>mvn:org.apache.brooklyn.camp/camp-base/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn.camp/camp-server/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-api/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-camp/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-commands/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-core/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-jsgui/0.9.0-SNAPSHOT/war</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-logback-includes/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-rest-api/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-rest-server/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-rt-osgi/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-groovy/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-utils-rest-swagger/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.commons/commons-compress/1.4</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
             <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
             <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.4.1</bundle>
             <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle>
             <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2</bundle>
    +        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/0.9.9_1</bundle>
             <bundle>mvn:org.bouncycastle/bcpkix-jdk15on/1.49</bundle>
             <bundle>mvn:org.bouncycastle/bcprov-ext-jdk15on/1.49</bundle>
             <bundle>mvn:org.codehaus.groovy/groovy-all/2.3.7</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-jaxrs/1.9.13</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
             <bundle>mvn:org.freemarker/freemarker/2.3.22</bundle>
    +        <bundle>mvn:org.jvnet.mimepull/mimepull/1.9.3</bundle>
             <bundle>mvn:org.slf4j/jul-to-slf4j/1.6.6</bundle>
             <bundle>mvn:org.yaml/snakeyaml/1.11</bundle>
             <bundle>wrap:mvn:com.google.http-client/google-http-client/1.18.0-rc</bundle>
             <bundle>wrap:mvn:com.maxmind.geoip2/geoip2/0.8.1</bundle>
    -        <bundle>wrap:mvn:org.reflections/reflections/0.9.9-RC1</bundle>
    +        <bundle>wrap:mvn:javax.validation/validation-api/1.1.0.Final</bundle>
    +        <bundle>wrap:mvn:org.tukaani/xz/1.4</bundle>
    --- End diff --
    
    See [documentation](https://karaf.apache.org/manual/latest-3.0.x/developers-guide/karaf-maven-plugin-features-generate-descriptor.html) for more details.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-159290928
  
    Fixed; brooklyn-rest-server works fine within karaf.
    
    From my perspective this can and should be merged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45788283
  
    --- Diff: karaf/features/src/main/history/dependencies.xml ---
    @@ -2,46 +2,102 @@
     <features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="org.apache.brooklyn-0.9.0-SNAPSHOT">
         <feature version="0.0.0">
             <feature prerequisite="false" dependency="false">brooklyn-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-base</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-camp-brooklyn</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-core</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-core</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-rest-api</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
             <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
             <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-common</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
    +        <feature prerequisite="false" dependency="false">brooklyn-utils-rest-swagger</feature>
    +        <feature prerequisite="false" dependency="false">jetty</feature>
    +        <feature prerequisite="false" dependency="false">swagger-crippled</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>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.4.5</bundle>
             <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.5</bundle>
             <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.4.5</bundle>
    +        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.4.5</bundle>
             <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.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>
    +        <bundle>mvn:io.swagger/swagger-annotations/1.5.3</bundle>
    +        <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>
    +        <bundle>mvn:org.apache.brooklyn.camp/camp-base/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn.camp/camp-server/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-api/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-camp/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-commands/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-core/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-jsgui/0.9.0-SNAPSHOT/war</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-logback-includes/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-rest-api/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-rest-server/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-rt-osgi/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-common/0.9.0-SNAPSHOT</bundle>
             <bundle>mvn:org.apache.brooklyn/brooklyn-utils-groovy/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.brooklyn/brooklyn-utils-rest-swagger/0.9.0-SNAPSHOT</bundle>
    +        <bundle>mvn:org.apache.commons/commons-compress/1.4</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
    +        <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
             <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>
             <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/4.4.1</bundle>
             <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/4.4.1</bundle>
             <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2</bundle>
    +        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/0.9.9_1</bundle>
             <bundle>mvn:org.bouncycastle/bcpkix-jdk15on/1.49</bundle>
             <bundle>mvn:org.bouncycastle/bcprov-ext-jdk15on/1.49</bundle>
             <bundle>mvn:org.codehaus.groovy/groovy-all/2.3.7</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-jaxrs/1.9.13</bundle>
             <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
    +        <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
             <bundle>mvn:org.freemarker/freemarker/2.3.22</bundle>
    +        <bundle>mvn:org.jvnet.mimepull/mimepull/1.9.3</bundle>
             <bundle>mvn:org.slf4j/jul-to-slf4j/1.6.6</bundle>
             <bundle>mvn:org.yaml/snakeyaml/1.11</bundle>
             <bundle>wrap:mvn:com.google.http-client/google-http-client/1.18.0-rc</bundle>
             <bundle>wrap:mvn:com.maxmind.geoip2/geoip2/0.8.1</bundle>
    -        <bundle>wrap:mvn:org.reflections/reflections/0.9.9-RC1</bundle>
    +        <bundle>wrap:mvn:javax.validation/validation-api/1.1.0.Final</bundle>
    +        <bundle>wrap:mvn:org.tukaani/xz/1.4</bundle>
    --- End diff --
    
    Wasn't this generated by the build, should we remove it from source control?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45788069
  
    --- Diff: core/src/test/java/org/apache/brooklyn/core/catalog/internal/TestToSpecTransformer.java ---
    @@ -0,0 +1,118 @@
    +/*
    + * 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.
    + */
    +package org.apache.brooklyn.core.catalog.internal;
    +
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +
    +import org.apache.brooklyn.api.catalog.CatalogItem;
    +import org.apache.brooklyn.api.entity.Application;
    +import org.apache.brooklyn.api.entity.EntitySpec;
    +import org.apache.brooklyn.api.internal.AbstractBrooklynObjectSpec;
    +import org.apache.brooklyn.api.mgmt.ManagementContext;
    +import org.apache.brooklyn.core.plan.PlanNotRecognizedException;
    +import org.apache.brooklyn.core.plan.PlanToSpecTransformer;
    +import org.apache.brooklyn.util.text.Identifiers;
    +import org.apache.brooklyn.util.yaml.Yamls;
    +
    +/**
    + * Resolves previously registered specs by id.
    + * First create a spec and register it, keeping the returned ID:
    + * <pre> {@code
    + * String specId = TestToSpecTransformer.registerSpec(EntitySpec.create(BasicEntity.class));
    + * }</pre>
    + *
    + * Then build a plan to be resolved such as:
    + * <pre> {@code
    + *  brooklyn.catalog:
    + *    id: test.inputs
    + *    version: 0.0.1
    + *    item: <specId>
    + * } </pre>
    + */
    +public class TestToSpecTransformer implements PlanToSpecTransformer {
    --- End diff --
    
    This one is deleted in master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45788738
  
    --- Diff: usage/camp/pom.xml ---
    @@ -186,6 +186,23 @@
         <build>
             <plugins>
     
    +            <plugin>
    +                <groupId>org.apache.felix</groupId>
    +                <artifactId>maven-bundle-plugin</artifactId>
    +                <configuration>
    +                    <supportedProjectTypes>
    +                        <supportedProjectType>jar</supportedProjectType>
    +                    </supportedProjectTypes>
    +                    <instructions>
    +                        <Export-Package>org.apache.brooklyn.*</Export-Package>
    +                        <Import-Package>
    +                            !org.python.google.common.collect
    --- End diff --
    
    If there's code in Brooklyn using python APIs should migrate it to guava instead of doing this. Worth adding to the maven api check as well, not the first time this has snuck in.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45800863
  
    --- Diff: core/src/test/java/org/apache/brooklyn/core/catalog/internal/TestToSpecTransformer.java ---
    @@ -0,0 +1,118 @@
    +/*
    + * 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.
    + */
    +package org.apache.brooklyn.core.catalog.internal;
    +
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +
    +import org.apache.brooklyn.api.catalog.CatalogItem;
    +import org.apache.brooklyn.api.entity.Application;
    +import org.apache.brooklyn.api.entity.EntitySpec;
    +import org.apache.brooklyn.api.internal.AbstractBrooklynObjectSpec;
    +import org.apache.brooklyn.api.mgmt.ManagementContext;
    +import org.apache.brooklyn.core.plan.PlanNotRecognizedException;
    +import org.apache.brooklyn.core.plan.PlanToSpecTransformer;
    +import org.apache.brooklyn.util.text.Identifiers;
    +import org.apache.brooklyn.util.yaml.Yamls;
    +
    +/**
    + * Resolves previously registered specs by id.
    + * First create a spec and register it, keeping the returned ID:
    + * <pre> {@code
    + * String specId = TestToSpecTransformer.registerSpec(EntitySpec.create(BasicEntity.class));
    + * }</pre>
    + *
    + * Then build a plan to be resolved such as:
    + * <pre> {@code
    + *  brooklyn.catalog:
    + *    id: test.inputs
    + *    version: 0.0.1
    + *    item: <specId>
    + * } </pre>
    + */
    +public class TestToSpecTransformer implements PlanToSpecTransformer {
    --- End diff --
    
    Removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45787962
  
    --- Diff: core/src/main/resources/OSGI-INF/blueprint/blueprint.xml ---
    @@ -0,0 +1,41 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +Copyright 2015 The Apache Software Foundation.
    +
    +Licensed 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.
    +-->
    +
    +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    +           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    +           xsi:schemaLocation="
    +             http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
    +             http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
    +             ">
    +
    +<!--    <cm:property-placeholder persistent-id="org.apache.brooklyn.properties" update-strategy="reload">
    +        <cm:default-properties>
    +            <cm:property name="some-property" value="${karaf.data}/some-path"/>
    +        </cm:default-properties>
    +    </cm:property-placeholder>-->
    +
    +    <bean id="localManagementContextService"
    +          class="org.apache.brooklyn.core.mgmt.internal.LocalManagementContext" />
    --- End diff --
    
    Doesn't look like this will instantiate a valid LocalManagementContext, won't be initialized properly, will be different from the one in `BrooklynLauncher`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-158037706
  
    Currently brooklyn-rest-server can be properly deployed as a feature in karaf, integrated with pax-web WAR extender. This allows the use of Jersey as a plain servlet for the REST api. However, at this point the contents of REST resources is not initialized with the appropriate management context, and so are the servlet filters. For this reason, launching the rest server within karaf still crashes, but that will be done as soon as we find a clean solution to inject the management context into the servlet context.
    
    brooklyn-jsgui is also deployable as a WAR. For the purpose of separating concerns, having multiple GUIs pluggable into the karaf container we must have the GUI and REST APIs deployable at configurable base URLs (or at least base paths on the same server).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-158986084
  
    Well, before syncing up with master I had the rest-server and the jsgui working. Although there still is a problem for them to work together (see below), the rest-server was completely usable.
    
    However, the new commits from master seem to expose jython classes in the bundle exported packages, so we're back again to the winrm problem. We need to integrate @splatch's work on brooklyn-itest, so developer can see if their unrelated changes break the karaf assembly project, so this does not happen anymore.
    
    The problem with integrating brooklyn-jsgui and brooklyn-rest-server is that neither of them is deployable as a separate karaf feature. They can only work together in the presence of the highly customized webcontext that is created by the `BrooklynWebServer` class in brooklyn-launcher (and reimplemented in various other projects for tests). This is another discussion that I want to start on the mailing list though, since it does not affect the progress within this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-159411762
  
    I'll address some. Thanks @neykov 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45788493
  
    --- Diff: karaf/pom.xml ---
    @@ -30,18 +30,24 @@
       <packaging>pom</packaging>
    --- End diff --
    
    I assume its parent it `brooklyn` (and not `brooklyn-parent` on purpose)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#issuecomment-159396939
  
    Looks good, some minor comments worth addressing. 
    Couldn't figure out how the `ManagementContext` sharing works, probably needs more work (as part of a next iteration)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45797421
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/osgi/Osgis.java ---
    @@ -338,12 +336,12 @@ public static Framework getFramework(String felixCacheDir, boolean clean) {
          * @param framework
          */
         public static void ungetFramework(Framework framework) {
    -        final Bundle frameworkBundle = FrameworkUtil.getBundle(Framework.class);
    -        if (frameworkBundle != null) {
    -            // already running inside an OSGi container
    -            final BundleContext ctx = frameworkBundle.getBundleContext();
    -            final ServiceReference<?> ref = ctx.getServiceReference(Framework.class);
    -            ctx.ungetService(ref);
    +        final Bundle bundle = FrameworkUtil.getBundle(Osgis.class);
    +        if (bundle != null) {
    +//            // already running inside an OSGi container
    +//            final BundleContext ctx = bundle.getBundleContext();
    +//            final ServiceReference<Framework> ref = ctx.getServiceReference(Framework.class);
    +//            ctx.ungetService(ref);
    --- End diff --
    
    I think it can be safely removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45786901
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java ---
    @@ -53,7 +53,7 @@ public BasicConfigurableObject() {
         }
     
         @Override
    -    public void injectManagementContext(ManagementContext managementContext) {
    +    public void setManagementContext(ManagementContext managementContext) {
    --- End diff --
    
    Breaks binary + source compatibility, but I guess it's fine as we've already have another precedent for this release. Worth adding to the release notes.
    
    Out of curiosity, is this needed for OSGi injection, which library will be able to inject the context here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45788395
  
    --- Diff: karaf/pom.xml ---
    @@ -30,18 +30,24 @@
       <packaging>pom</packaging>
     
       <properties>
    -    <karaf.version>4.0.2</karaf.version>
    +    <karaf.version>4.0.3</karaf.version>
     
         <org.osgi.core.version>6.0.0</org.osgi.core.version>
         <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version>
         
         <lifecycle-mapping-plugin.version>1.0.0</lifecycle-mapping-plugin.version>
     
    +    <javax-servlet-api.version>3.1.0</javax-servlet-api.version>
    --- End diff --
    
    Already defined as `javax-servlet.version` in parent


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45787300
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/osgi/Osgis.java ---
    @@ -338,12 +336,12 @@ public static Framework getFramework(String felixCacheDir, boolean clean) {
          * @param framework
          */
         public static void ungetFramework(Framework framework) {
    -        final Bundle frameworkBundle = FrameworkUtil.getBundle(Framework.class);
    -        if (frameworkBundle != null) {
    -            // already running inside an OSGi container
    -            final BundleContext ctx = frameworkBundle.getBundleContext();
    -            final ServiceReference<?> ref = ctx.getServiceReference(Framework.class);
    -            ctx.ungetService(ref);
    +        final Bundle bundle = FrameworkUtil.getBundle(Osgis.class);
    +        if (bundle != null) {
    +//            // already running inside an OSGi container
    +//            final BundleContext ctx = bundle.getBundleContext();
    +//            final ServiceReference<Framework> ref = ctx.getServiceReference(Framework.class);
    +//            ctx.ungetService(ref);
    --- End diff --
    
    Do you need this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45800799
  
    --- Diff: 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>
    --- End diff --
    
    Addressed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by hzbarcea <gi...@git.apache.org>.
Github user hzbarcea commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45818918
  
    --- Diff: karaf/pom.xml ---
    @@ -30,18 +30,24 @@
       <packaging>pom</packaging>
    --- End diff --
    
    Yes, on purpose, although it's  not a significant difference.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45797316
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java ---
    @@ -53,7 +53,7 @@ public BasicConfigurableObject() {
         }
     
         @Override
    -    public void injectManagementContext(ManagementContext managementContext) {
    +    public void setManagementContext(ManagementContext managementContext) {
    --- End diff --
    
    Aries blueprints injects using setter methods. I had this working with CXF resources, where the management context gets injected by the framework. I've since gone on the jersey path, and I'm not sure how to achieve the same with jersey, so I made a proposal to migrate to CXF altogether.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/1048


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by CMoH <gi...@git.apache.org>.
Github user CMoH commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45798003
  
    --- Diff: 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>
    --- End diff --
    
    Yes, they are indeed. However, I plan to revisit each pom regarding maven-bundle-plugin, so I slacked a bit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Brooklyn OSGification - step 2 (b...

Posted by hzbarcea <gi...@git.apache.org>.
Github user hzbarcea commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1048#discussion_r45818963
  
    --- Diff: usage/camp/pom.xml ---
    @@ -186,6 +186,23 @@
         <build>
             <plugins>
     
    +            <plugin>
    +                <groupId>org.apache.felix</groupId>
    +                <artifactId>maven-bundle-plugin</artifactId>
    +                <configuration>
    +                    <supportedProjectTypes>
    +                        <supportedProjectType>jar</supportedProjectType>
    +                    </supportedProjectTypes>
    +                    <instructions>
    +                        <Export-Package>org.apache.brooklyn.*</Export-Package>
    +                        <Import-Package>
    +                            !org.python.google.common.collect
    --- End diff --
    
    Yes, this must be resolved in a follow-up commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---