Claus Ibsen created CAMEL-27391:
-----------------------------------

             Summary: camel-jbang - camel export to Camel Main adds the 
platform-http server only when a cxf consumer exists
                 Key: CAMEL-27391
                 URL: https://issues.apache.org/jira/browse/CAMEL-27391
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang, camel-cxf
            Reporter: Claus Ibsen
             Fix For: 4.24.0


With CAMEL-27389, a cxf consumer in Camel Main and Camel JBang is served on the 
platform-http server by the new {{camel-cxf-platform-http}} module.

When {{camel export}} targets Camel Main, 
{{CamelMainExporter.doResolveDependencies}} adds {{camel-cxf-platform-http}} 
and {{camel-platform-http-main}} for every integration that uses 
{{camel-cxf-soap}}. The dependency list cannot tell a consumer from a producer, 
so an integration that only calls SOAP services (cxf producers) also gets the 
HTTP server dependency.

Nothing breaks: {{camel-cxf-platform-http}} starts the HTTP server only when 
the first cxf consumer starts. But the exported project has dependencies it 
does not need.

Improvement: add the two dependencies only when the integration has a cxf 
consumer (a route that starts {{from}} a {{cxf:}} endpoint). The export loads 
the routes, so the route inputs may tell this.

The Spring Boot and Quarkus exports are not affected: they use the CXF starter 
and the CXF extension of Quarkus.

Found while doing CAMEL-27389 (apache/camel#30603).

_Claude Code on behalf of Claus Ibsen (davsclaus)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to