[jira] [Comment Edited] (CXF-7045) Update sample description_swagger2_osgi README.txt
[ https://issues.apache.org/jira/browse/CXF-7045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496718#comment-15496718 ] Andriy Redko edited comment on CXF-7045 at 9/16/16 4:22 PM: Hi Sergey, I think it is feasible in general, but why would CXF provide a feature to install just Jackson? Here is basically the concern I have. F.e. if I am building an application and I need to install additional bundles (Jackson is good example, like you mentioned), I do know that and I will install them. Now, it happens that our own sample project has to include some additional bundles as well. We could make this process easier (by pre-installing some bundles, hopefully users will need them anyway) or ask user to do that. I am honestly not sure about having dedicated CXF feature for Jackson, it feels like that should not be the CXF responsibility but Jackson itself. However we do have similar use cases, f.e. *cxf-jaxb*, so I think in general it might be OK. So it would mean to have standalone *cxf-jackson* feature, and *cxf-rt-rs-service-description-swagger* will depend on it as well, right? Thanks. Best Regards, Andriy Redko was (Author: reta): Hi Sergey, I think it is feasible in general, but why would CXF provide a feature to install just Jackson? Here is basically the concern I have. F.e. if I am building an application and I need to install additional bundles (Jackson is good example, like you mentioned), I do know that and I will install them. Now, it happens that our own sample project has to include some additional bundles as well. We could make this process easier (by pre-installing some bundles, hopefully users will need them anyway) or ask user to do that. I am honestly not sure about having dedicated CXF feature for Jackson, it feels like that should not be the CXF responsibility but Jackson itself. However we do have similar use cases, f.e. cxf-jaxb, so I think in general it might be OK. So it would mean to have standalone *cxf_jackson* feature, and *cxf-rt-rs-service-description-swagger* will depend on it as well, right? Thanks. Best Regards, Andriy Redko > 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 (v6.3.4#6332)
[jira] [Comment Edited] (CXF-7045) Update sample description_swagger2_osgi README.txt
[ https://issues.apache.org/jira/browse/CXF-7045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496577#comment-15496577 ] Sergey Beryozkin edited comment on CXF-7045 at 9/16/16 3:29 PM: I've been wondering if we should support different scenarios and thus have few features. First we should have a helper 'jackson' feature - for all the users who prefer to install Jackson in OSGI, this in itself not related to Swagger2. Next we have a 'minimal' Swagger2 feature - it has all but jackson specific dependencies. Finally we have a current swagger2 feature which, with option3 enforced, simply works - it will depend on a new jackson feature. So if a user has already installed Jackson manually or with a new Jackson feature to support JSON at the application level and Swagger is needed - then 'minimal' Swagger2 feature is installed. Otherwise - a complete swagger2 feature is installed. Does it work ? Sergey was (Author: sergey_beryozkin): I've been wondering if we should support difference scenarios and thus have few features. First we should have a helper 'jackson' feature - for all the users who prefer to install Jackson in OSGI, this in itself not related to Swagger2. Next we have a 'minimal' Swagger2 feature - it has all but jackson specific dependencies. Finally we have a current swagger2 feature which, with option3 enforced, simply works - it will depend on a new jackson feature. So if a user has already installed Jackson manually or with a new Jackson feature to support JSON at the application level and Swagger is needed - then 'minimal' Swagger2 feature is installed. Otherwise - a complete swagger2 feature is installed. Does it work ? 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 (v6.3.4#6332)
[jira] [Comment Edited] (CXF-7045) Update sample description_swagger2_osgi README.txt
[ https://issues.apache.org/jira/browse/CXF-7045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493952#comment-15493952 ] Andriy Redko edited comment on CXF-7045 at 9/15/16 5:06 PM: Hey Sergey, No problem. So here is the thing (Swagger 2 OSGi sample): - yes, you see the usage of JAX-RS provider in the sample (which is part of com.fasterxml.jackson.jaxrs artifacts) - yes, cxf-rt-rs-service-description-swagger lists two com.fasterxml.jackson.jaxrs artifacts in the feature.xml definition - however, they won't be installed by Karaf, because our Swagger 2 integration does not depend on any class from com.fasterxml.jackson.jaxrs artifacts (the respective bundles are marked with dependency="true" attribute) - but our Swagger 2 OSGi sample uses JacksonJsonProvider so when it is being installed into Karaf container, two com.fasterxml.jackson.jaxrs have to be installed manually as well As Aki mention, previous version of Swagger had a dependency to com.fasterxml.jackson.jaxrs and as such, Karaf installed them as part of cxf-rt-rs-service-description-swagger feature. In this case, our samples just work, nothing to be done. Now, the dependency graph has changed and com.fasterxml.jackson.jaxrs are resolved as a unused dependencies (and as such skipped), so when we ask user to install sample application bundle, com.fasterxml.jackson.jaxrs bundles are not present and have to be installed manually :( Hope I included all the pieces ... :-) Please let me know if something is still not clear. Thanks! Best Regards, Andriy Redko was (Author: reta): Hey Sergey, No problem. So here is the thing (Swagger 2 OSGi sample): - yes, you see the usage of JAX-RS provider in the sample (which is part of com.fasterxml.jackson.jaxrs artifacts) - yes, cxf-rt-rs-service-description-swagger lists two com.fasterxml.jackson.jaxrs artifacts in the feature.xml definition - however, they won't be installed by Karaf, because our Swagger 2 integration does not depend on any class from com.fasterxml.jackson.jaxrs artifacts (the respective bundles are marked with dependency="true" attribute) - but our Swagger 2 OSGi sample uses JacksonJsonProvider so when it is being installed into Karaf container, two com.fasterxml.jackson.jaxrs have to be installed manually as well As Aki mention, previous version of Swagger had a dependency to com.fasterxml.jackson.jaxrs and as such, Karaf installed them as part of cxf-rt-rs-service-description-swagger feature. In this case, our samples just work, nothing to be done. Now, the dependency graph has changed and com.fasterxml.jackson.jaxrs are resolved as a dependencies, so when we ask user to install sample application bundle, com.fasterxml.jackson.jaxrs bundles are not present and have to be installed manually :( Hope I included all the pieces ... :-) Please let me know if something is still not clear. Thanks! Best Regards, Andriy Redko > 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 (v6.3.4#6332)