开发者

CXF in Java 5 - Extra Maven Dependencies

开发者 https://www.devze.com 2023-03-19 07:45 出处:网络
CXF relies on a bunch of libs that are in java 6 by default, adding them to a jav开发者_如何学编程a 5 project is a bit of a pain.

CXF relies on a bunch of libs that are in java 6 by default, adding them to a jav开发者_如何学编程a 5 project is a bit of a pain.

Is there an easy dependency or 2 to add to get CXF to work in Java 5?

Thanks.


This is what finally worked for me, and has the added bonus that it is OSGi compliant as well:

    <dependency>
        <groupId>org.apache.cxf.dosgi</groupId>
        <artifactId>cxf-dosgi-ri-singlebundle-distribution</artifactId>
        <version>1.2</version>
        <exclusions>
            <exclusion>
                <artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-wrapper</artifactId>
                <groupId>org.apache.cxf.dosgi</groupId>
            </exclusion>
        </exclusions>
    </dependency>

EDIT #1

A word of caution (learned the hard way), this dependency has it's own version of several libraries including Xerces. If you are using something else that has one of these on the path (for example: dom4j -> jaxen -> xerces) you may end up getting weird "AbstractMethodErrors" because you essentially have two copies of the same class on your path :(

0

精彩评论

暂无评论...
验证码 换一张
取 消