0

我正在为我的 Java 项目使用 Maven 并收到此错误

java.lang.NoClassDefFoundError: org/apache/cxf/logging/FaultListener 

我想我需要包含上面的 maven 依赖项。我在下面的pom.xml中发布了代码片段。

          <properties>          
                  <cxf.version>2.5.2</cxf.version>          
          </properties>
          <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-frontend-jaxws</artifactId>
                <version>${cxf.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-javamail_1.4_spec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-activation_1.1_spec</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-http</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-frontend-jaxrs</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-rs-security-xml</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-ws-security</artifactId>
                <version>${cxf.version}</version>
            </dependency>

我对 Maven 不太满意。有人可以帮帮我。

4

1 回答 1

0

这门课在org.apache.cxf:cxf-api. 其他 cxf 工件(例如 cxf-rt-transports-http)将此作为依赖项,因此您应该已经拥有它。

构建项目时是否包含 cxf-api jar?

于 2012-12-11T12:12:13.570 回答