I've created PR #1140 containing a CXF implementation of brooklyn's REST services, geared towards the effort to run brooklyn as an OSGi feature within karaf.
For this purpose I added the brooklyn-rest-resources-cxf project, which contains the same resources as broojlyn-server, but implemented using CXF and Aries blueprint injection. However, cxf-3.1.4 is based on jax-rs-2.x, so the existing brooklyn-rest-api (which is based on jax-rs-1 for Jersey-1.x) is not compatible. I duplicated it as brooklyn-brooklyn-rest-api-cxf. An interesting point to make is that jax-rs-2 is downward compatible with jax- rs-1, but only at the source level. The binary jax-rs jars and dependent compiled projects cannot be interchanged successfully. CXF cannot find annotations when parsing annotated classes built against jax-rs-1, while jersey-1 crashes when jax-rs-2 is on the classpath. I am trying to find solutions to merge the two rest-api projects, so we don't duplicate the sources, while still producing two different maven artifacts: one with jax-rs-1 for brooklyn-rest-server, and another using jax-rs-2 for the cxf implementation. I am appealing to you to discuss solutions for this, and select one that seems best for the time being. Thanks!
