Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature repo-add doesn't work #4

Open
catshout opened this issue Apr 10, 2020 · 5 comments
Open

feature repo-add doesn't work #4

catshout opened this issue Apr 10, 2020 · 5 comments

Comments

@catshout
Copy link

catshout commented Apr 10, 2020

Hi @splatch,

I tried to add the feature with

feature:repo-add mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml

and got

Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT

Is there any other way to add the feature? Tx in advance.

Gerald

@splatch
Copy link
Member

splatch commented Apr 20, 2020

@catshout Snapahot version is not published to external repositories which you use in your Karaf instance.

try adding sonatype-oss repo to etc/org.ops4j.pax.url.mvn.cfg or build project locally.

@glakshmi23
Copy link

glakshmi23 commented May 13, 2020

i build locally and feature is in local maven. Even then i getting

karaf@trun()> feature:repo-add mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
Adding feature url mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
Error executing command: Error resolving artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT: [Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in defaultlocal (file:/C:/Users/windows/.m2/repository/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in sonatype.snapshots.deploy (https://oss.sonatype.org/content/repositories/snapshots/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in ops4j.sonatype.snapshots.deploy (https://oss.sonatype.org/content/repositories/ops4j-snapshots/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in spring-ebr-repository (http://repository.springsource.com/maven/bundles/external/)] : mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
karaf@trun()> mvn:io.swagger/swagger-annotations/mvn:io.swagger/swagger-annotations/

@splatch
Copy link
Member

splatch commented Jun 2, 2020

@glakshmi23 @catshout It is my fault. This project was not uploaded to sonatype thus my earlier tip couldn't work. I am deploying the 3.0.0-SNAPSHOT (in its ancient form). The itest are failing on master thus you might need your own tweaks to get it running with recent Karaf/Talend ESB.

@catshout
Copy link
Author

Finally I've installed in Karaf as described here ..
https://cwiki.apache.org/confluence/display/CXF20DOC/OpenApiFeature#OpenApiFeature-EnablingSwaggerUIinOSGicontainer(Karaf)

Could someone point me out what the URL is and how to call with a swagger file from a deployed service?

Thanks in advance
Gerald

@splatch
Copy link
Member

splatch commented Aug 31, 2020

@catshout there are two things to distinguish. CXF has native support for CXF but it works on service basis. This means that if you have two or three bundles publishing different endpoints you will have three different swagger descriptors generated.

This project aims generation of composite swagger descriptor out of all CXF/JAX-RS services deployed within Karaf. If you need this then you leave your CXF endpoints as-is and deploy this project. Swagger descriptor will be published at /services/swagger (.json) for Talend ESB or /cxf/swagger for plain Karaf.

The swagger-ui deployment can be arranged as needed. This project ships "ui" module which deploys javascript client at /swagger-ui/index.html. You can of course use webjars, however then you need to make sure that they get processed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants