2015-10-20 165 views

回答

0

检查你的POM,应该沿着这些路线的东西:有细微的差别,以配合您的WSDL位置/装订(如果有的话)/等。 类

<plugin> 
      <groupId>org.jvnet.jaxb2.maven2</groupId> 
      <artifactId>maven-jaxb2-plugin</artifactId> 
      <version>0.8.1</version> <!-- I used version 0.8.1 since 0.8.2 is bugged and it throws the Exception 
       "Illegal pattern character 'g' "when using italian locale --> 
      <executions> 
       <execution> 
        <id>wsdl-generation</id> 
        <goals> 
         <goal>generate</goal> 
        </goals> 
        <configuration> 
         <schemaDirectory>src/main/resources/wsdl</schemaDirectory> 
         <schemaIncludes> 
          <include>*.xsd</include> 
         </schemaIncludes> 
         <extension>true</extension> 
         <!-- Specify binding directory where we put customization for the 
          generated classes --> 
         <bindingDirectory>src/main/resources/binding</bindingDirectory> 
         <bindingIncludes> 
          <include>*.xjb</include> 
         </bindingIncludes> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

是在目标下生成的,因此请确保将它们添加到类路径中(只需在运行生成源之后,执行maven-> update项目,如果我记得正确,它应该处理它)。 您可能想要做一个右键点击 - >运行 - > maven生成源,以防它看起来不能正常工作。