Search

Chapter 3. Configuring Maven Dependencies

download PDF
This chapter provides information for using the Apache CXF component with Kie-Camel.

Integrating Apache CXF with Kie-Camel

To support both EAP and Karaf containers, kie-camel should support Apache CXF 2.7.x and 3.x versions. Each version might contain different packages, classes, and methods. In your project, if you are using both kie-camel and Apache CXF, the application might display a few classpath collision errors. To avoid this, Red Hat recommends that you exclude the artifacts whose version does not match the container version, and replace them with artifacts whose version matches the version of Apache CXF in your container.
  • EAP 6.4.x: You can define eap.cxf.version in properties with the Apache CXF version that is in your EAP container.
    
    <dependency>
        <groupId>org.jboss.integration.fuse</groupId>
        <artifactId>kie-camel</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-core</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-core</artifactId>
        <version>${eap.cxf.version}</version>
    </dependency>
    
  • Fuse on Karaf: Define karaf.cxf.version in properties with Apache CXF version that is in your Fuse/Karaf container.
    
    <dependency>
        <groupId>org.jboss.integration.fuse</groupId>
        <artifactId>kie-camel</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-rs-security-oauth</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-frontend-jaxws</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-features-clustering</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-bindings-soap</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-rs-security-oauth</artifactId>
        <version>${karaf.cxf.version}
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${karaf.cxf.version}
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        <version>${karaf.cxf.version}
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-features-clustering</artifactId>
        <version>${karaf.cxf.version}
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-bindings-soap</artifactId>
        <version>${karaf.cxf.version}
    </dependency
    
    
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.