2012-12-11 298 views
0

我使用Maven我的Java项目,并收到此错误的Maven依赖的CXF

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

我想我需要包括maven的依赖性为above.I已经公布的代码片段从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不是很满意,可以有人帮助我。

回答

0

本组在org.apache.cxf:cxf-api。其他cxf构件如cxf-rt-transports-http将此作为依赖项,因此您应该已经有

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

+0

是的,我检查了我的战争,发现cxf-api罐子 – Anand

+0

是它的类吗? – Qwerky

+0

你的战争中你的cxf-api jar版本是什么? – willome