Hi Cipi, For completeness I am including my comment in 1140 with a proposal for doing the transition: rest-api: create a maven profile to conditionally compile with either jersey or CXF rest-server: move all jersey specific code to a src/jersey/ folder (hopefully just a handful of files) rest-server: re-implement identical functionality in src/cxf/ folder but depending on CXF rest-server: create a maven profile to conditionally compile one or the other rest-client: same as rest-server mail the dev list, warning of the transient dependency change and possible API changes flip the default profile so we use CXF now, leaving jersey still there, but not in the official build (may be after next release?) after one more release remove jersey code and profiles This allows for a single artifact only. We can go further, creating separate modules for each variant, but don't think it's worth the complications. wdyt?
Svet. > On 21.01.2016 г., at 15:36, Ciprian Ciubotariu <[email protected]> wrote: > > 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!
