title: Configuring CXF codegen plugin
body: <p>I have a problem in my pom.xml file, i didn't understood very well what is the problem since i use jdk/jre 1.7(classloader) (the latest), it's about a webservice project using CXF/Spring  :</p>
  
  <h2>My Machine :</h2>
  
  <p>Windows 7, x64; eclipse Juno, Jdk/jre 1.7, Maven 3.0.5, eclipse compiler 1.7</p>
  
  <p>I know it's not pretty with all that source code  :hunf: </p>
  
  <h2>Error Log:</h2>
  
  <pre><code>Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:2.7.3:wsdl2java failed: Unable to load the mojo 'wsdl2java' in the plugin 'org.apache.cxf:cxf-codegen-plugin:2.7.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Bad version number in .class file
  -----------------------------------------------------
  realm =    plugin&amp;gt;org.apache.cxf:cxf-codegen-plugin:2.7.3
  strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  urls[0] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-codegen-plugin/2.7.3/cxf-codegen-plugin-2.7.3.jar
  urls[1] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/maven/shared/maven-artifact-resolver/1.0/maven-artifact-resolver-1.0.jar
  urls[2] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
  urls[3] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar
  urls[4] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar
  urls[5] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-api/2.7.3/cxf-api-2.7.3.jar
  urls[6] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/codehaus/woodstox/woodstox-core-asl/4.1.4/woodstox-core-asl-4.1.4.jar
  urls[7] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar
  urls[8] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/ws/xmlschema/xmlschema-core/2.0.3/xmlschema-core-2.0.3.jar
  urls[9] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
  urls[10] = file:/D:/cursos/J2EE/MAVEN/local-repo/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
  urls[11] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-tools-common/2.7.3/cxf-tools-common-2.7.3.jar
  urls[12] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/velocity/velocity/1.7/velocity-1.7.jar
  urls[13] = file:/D:/cursos/J2EE/MAVEN/local-repo/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
  urls[14] = file:/D:/cursos/J2EE/MAVEN/local-repo/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
  urls[15] = file:/D:/cursos/J2EE/MAVEN/local-repo/com/sun/xml/bind/jaxb-xjc/2.1.13/jaxb-xjc-2.1.13.jar
  urls[16] = file:/D:/cursos/J2EE/MAVEN/local-repo/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13.jar
  urls[17] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-rt-core/2.7.3/cxf-rt-core-2.7.3.jar
  urls[18] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-tools-wsdlto-core/2.7.3/cxf-tools-wsdlto-core-2.7.3.jar
  urls[19] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-tools-validator/2.7.3/cxf-tools-validator-2.7.3.jar
  urls[20] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-rt-bindings-soap/2.7.3/cxf-rt-bindings-soap-2.7.3.jar
  urls[21] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-rt-databinding-jaxb/2.7.3/cxf-rt-databinding-jaxb-2.7.3.jar
  urls[22] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar
  urls[23] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.7.3/cxf-tools-wsdlto-databinding-jaxb-2.7.3.jar
  urls[24] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.7.3/cxf-tools-wsdlto-frontend-jaxws-2.7.3.jar
  urls[25] = file:/D:/cursos/J2EE/MAVEN/local-repo/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
  urls[26] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-tools-wsdlto-frontend-javascript/2.7.3/cxf-tools-wsdlto-frontend-javascript-2.7.3.jar
  urls[27] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/cxf/cxf-rt-javascript/2.7.3/cxf-rt-javascript-2.7.3.jar
  urls[28] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/springframework/spring-core/3.0.7.RELEASE/spring-core-3.0.7.RELEASE.jar
  urls[29] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/springframework/spring-asm/3.0.7.RELEASE/spring-asm-3.0.7.RELEASE.jar
  urls[30] = file:/D:/cursos/J2EE/MAVEN/local-repo/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
  urls[31] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/springframework/spring-beans/3.0.7.RELEASE/spring-beans-3.0.7.RELEASE.jar
  urls[32] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/springframework/spring-context/3.0.7.RELEASE/spring-context-3.0.7.RELEASE.jar
  urls[33] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/springframework/spring-aop/3.0.7.RELEASE/spring-aop-3.0.7.RELEASE.jar
  urls[34] = file:/D:/cursos/J2EE/MAVEN/local-repo/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
  urls[35] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/springframework/spring-expression/3.0.7.RELEASE/spring-expression-3.0.7.RELEASE.jar
  urls[36] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
  urls[37] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.jar
  urls[38] = file:/D:/cursos/J2EE/MAVEN/local-repo/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.jar
  Number of foreign imports: 4
  import: Entry[import org.sonatype.plexus.build.incremental from realm ClassRealm[plexus.core, parent: null]]
  import: Entry[import org.codehaus.plexus.util.Scanner from realm ClassRealm[plexus.core, parent: null]]
  import: Entry[import org.codehaus.plexus.util.AbstractScanner from realm ClassRealm[plexus.core, parent: null]]
  import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  
  -----------------------------------------------------
   (org.apache.cxf:cxf-codegen-plugin:2.7.3:wsdl2java:generate-sources:generate-sources)
  </code></pre>
  
  <h2>And the pom.xml content :</h2>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;  
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  
  
    &lt;groupId&gt;fr.atatorus&lt;/groupId&gt;  
    &lt;artifactId&gt;bookclient&lt;/artifactId&gt;  
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;  
    &lt;packaging&gt;jar&lt;/packaging&gt;  
  
    &lt;name&gt;bookclient&lt;/name&gt;  
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;  
  
    &lt;properties&gt;  
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;  
      &lt;cxf.version&gt;2.7.3&lt;/cxf.version&gt;  
      &lt;spring.version&gt;3.1.3.RELEASE&lt;/spring.version&gt;      
    &lt;/properties&gt;  
  
    &lt;dependencies&gt;  
          &lt;dependency&gt;  
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;  
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;  
              &lt;version&gt;${spring.version}&lt;/version&gt;  
          &lt;/dependency&gt;  
          &lt;dependency&gt;  
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;  
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;  
              &lt;version&gt;${spring.version}&lt;/version&gt;  
          &lt;/dependency&gt;  
          &lt;dependency&gt;  
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;  
              &lt;artifactId&gt;cxf-rt-frontend-jaxws&lt;/artifactId&gt;  
              &lt;version&gt;2.7.3&lt;/version&gt;  
          &lt;/dependency&gt;  
  
          &lt;dependency&gt;  
              &lt;groupId&gt;junit&lt;/groupId&gt;  
              &lt;artifactId&gt;junit&lt;/artifactId&gt;  
              &lt;version&gt;3.8.1&lt;/version&gt;  
              &lt;scope&gt;test&lt;/scope&gt;  
          &lt;/dependency&gt;  
    &lt;/dependencies&gt;  
    &lt;build&gt;  
          &lt;plugins&gt;  
              &lt;plugin&gt;  
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;  
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;  
                  &lt;version&gt;2.5&lt;/version&gt;  
                  &lt;configuration&gt;  
                      &lt;source&gt;1.7&lt;/source&gt;  
                      &lt;target&gt;1.7&lt;/target&gt;  
                  &lt;/configuration&gt;  
              &lt;/plugin&gt;  
  
              &lt;plugin&gt;  
                  &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;  
                  &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;  
                  &lt;version&gt;${cxf.version}&lt;/version&gt;  
                  &lt;executions&gt;  
                      &lt;execution&gt;  
                          &lt;id&gt;generate-sources&lt;/id&gt;  
                          &lt;phase&gt;generate-sources&lt;/phase&gt;  
                          &lt;configuration&gt;  
                              &lt;wsdlRoot&gt;${basedir}/target/resources/wsdl&lt;/wsdlRoot&gt;  
                              &lt;wsdlOptions&gt;  
                                  &lt;wsdlOption&gt;  
                                      &lt;wsdl&gt;${basedir}/target/resources/wsdl/BookService.wsdl&lt;/wsdl&gt;  
                                      &lt;extraargs&gt;  
                                          &lt;extraarg&gt;-client&lt;/extraarg&gt;  
                                          &lt;!--  
                                          &lt;extraarg&gt;-impl&lt;/extraarg&gt;  
                                              &lt;extraarg&gt;-server&lt;/extraarg&gt;  
                                          --&gt;  
                                      &lt;/extraargs&gt;  
                                  &lt;/wsdlOption&gt;  
                              &lt;/wsdlOptions&gt;  
                          &lt;/configuration&gt;  
                          &lt;goals&gt;  
                              &lt;goal&gt;wsdl2java&lt;/goal&gt;  
                          &lt;/goals&gt;  
                      &lt;/execution&gt;  
                  &lt;/executions&gt;  
              &lt;/plugin&gt;  
  
              &lt;plugin&gt;  
                  &lt;groupId&gt;com.googlecode.maven-download-plugin&lt;/groupId&gt;  
                  &lt;artifactId&gt;maven-download-plugin&lt;/artifactId&gt;  
                  &lt;version&gt;1.0.0&lt;/version&gt;  
                  &lt;executions&gt;  
                      &lt;execution&gt;  
                          &lt;id&gt;Download wsdl&lt;/id&gt;  
                          &lt;goals&gt;  
                              &lt;goal&gt;wget&lt;/goal&gt;  
                          &lt;/goals&gt;  
                          &lt;phase&gt;validate&lt;/phase&gt;  
                          &lt;configuration&gt;  
                              &lt;url&gt;http://localhost:8080/bookservice2/services/book?wsdl&lt;/url&gt;  
                              &lt;!--  
                              &lt;url&gt;http://localhost:8080/BookService/services?wsdl&lt;/url&gt; 
                               --&gt;  
                              &lt;outputDirectory&gt;${basedir}/target/resources/wsdl&lt;/outputDirectory&gt;  
                              &lt;outputFileName&gt;BookService.wsdl&lt;/outputFileName&gt;  
                              &lt;skipCache&gt;true&lt;/skipCache&gt;  
                          &lt;/configuration&gt;  
                      &lt;/execution&gt;  
                  &lt;/executions&gt;  
              &lt;/plugin&gt;  
              &lt;plugin&gt;  
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;  
                  &lt;artifactId&gt;aspectj-maven-plugin&lt;/artifactId&gt;  
                  &lt;version&gt;1.3.1&lt;/version&gt;  
                  &lt;configuration&gt;  
                      &lt;complianceLevel&gt;1.5&lt;/complianceLevel&gt;  
                      &lt;aspectLibraries&gt;  
                          &lt;aspectLibrary&gt;  
                              &lt;groupId&gt;org.springframework&lt;/groupId&gt;  
                              &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;  
                          &lt;/aspectLibrary&gt;  
                      &lt;/aspectLibraries&gt;  
                  &lt;/configuration&gt;  
                  &lt;executions&gt;  
                      &lt;execution&gt;  
                          &lt;goals&gt;  
                              &lt;goal&gt;compile&lt;/goal&gt;  
                          &lt;/goals&gt;  
                      &lt;/execution&gt;  
                  &lt;/executions&gt;  
              &lt;/plugin&gt;              
          &lt;/plugins&gt;      
    &lt;/build&gt;  
  &lt;/project&gt;
  </code></pre>
  
  <p>I appreciate any suggestion.</p>
  
  <p>Thanks a lot </p>