Sergey Beryozkin commented on CXF-7045:

Hi Aki, 
Besides that here is what I said in some of my comments, there were few of them.

Right now Swagger 2 feature already includes Jackson deps - but the feature 
does not work and the user have to install Jackson deps manually. Removing 
these deps out of the feature will not make a feature complete - if a user has 
to pre-install Jackson manually for the feature to work then there's little 
point in having the feature in the 1st place. 

So we can keep these deps inside the feature by tweaking some of the attributes 
for the Jackson deps to resolve properly. But Jackson being Jackson, it is used 
a lot by CXF users who may not care about Swagger at all - all they need is 
JSON returned from their services. So if we do a simple refactoring and keep 
Jackson deps with the Swagger feature by having it depend on a dedicated 
Jackson feature instead of inlining these deps then:
- Swagger feature works and users do not install Jackson manually as in this 
- Extra benefit for free - CXF Jackson users can stop typing 5 install commands 
for all of the libs Jackson needs
- Will  let us deal later on with the case where users have Jackson installed, 
and now need Swagger2, but do not want it installing its own Jackson deps.
I reckon it will make things simpler, with Jackson, Swagger or Jackson/Swagger 
users all winning.
Cheers, Sergey

> Update sample description_swagger2_osgi README.txt
> --------------------------------------------------
>                 Key: CXF-7045
>                 URL: https://issues.apache.org/jira/browse/CXF-7045
>             Project: CXF
>          Issue Type: Bug
>          Components: Samples
>            Reporter: John Poth
>            Assignee: Freeman Fang
>            Priority: Minor
>             Fix For: 3.2.0, 3.1.8
> Update jackson version. Currently getting the error:
> {code}
> Caused by: org.osgi.framework.BundleException: Unable to resolve 
> org.apache.cxf.samples.jax_rs_description_swagger2_osgi [146](R 146.0): 
> missing requirement [org.apache.cxf.samples.jax_rs_description_swagger2_osgi 
> [146](R 146.0)] osgi.wiring.package; 
> (&(osgi.wiring.package=com.fasterxml.jackson.jaxrs.json)(version>=2.6.0)(!(version>=3.0.0)))
>  Unresolved requirements: 
> [[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [146](R 146.0)] 
> osgi.wiring.package; 
> (&(osgi.wiring.package=com.fasterxml.jackson.jaxrs.json)(version>=2.6.0)(!(version>=3.0.0)))]
> {code}

This message was sent by Atlassian JIRA

Reply via email to