小编Dav*_*ews的帖子

Maven cxf-codegen-plugin不生成源代码

我已经研究了这个问题的其他答案,但我还没能解决我的具体问题.我正在尝试使用Maven和cxf-codegen-plugin生成源客户端java文件.当我运行mvn generate-sources时,它告诉我BUILD SUCCESS但没有生成.任何帮助表示赞赏.这是我的pom:

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.tfs.common</groupId>
  <artifactId>SpringCXF1</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>

  <name>SpringCXF1 Maven Webapp</name>
  <url>http://maven.apache.org</url>

  <properties>
      <cxf.version>2.7.3</cxf.version>
      <project.build.sourceencoding>UTF-8</project.build.sourceencoding>
  </properties>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-rt-frontend-jaxws</artifactId>
       <version>${cxf.version}</version>
    </dependency>

    <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-rt-transports-http</artifactId>
       <version>${cxf.version}</version>
    </dependency>

  </dependencies>

  <build>
    <finalName>SpringCXF1</finalName>
      <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
        <configuration>
            <source>1.6</source>
            <target>1.6</target>
        </configuration>
    </plugin>

       <!-- Generate Java classes from WSDL during in generate-sources phase -->
       <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>${cxf.version}</version>
        <executions>
         <execution>
          <id>generate-sources</id>
          <phase>generate-sources</phase>
          <configuration>
           <sourceroot>${basedir}/src/main/java</sourceroot>
           <wsdloptions>
            <wsdloption>
             <wsdl>${basedir}/src/main/resources/HostavailableService.wsdl</wsdl>
             <extraargs>
                 <extraarg>-verbose</extraarg>
                  <extraarg>-client</extraarg>
             </extraargs>
            </wsdloption> …
Run Code Online (Sandbox Code Playgroud)

java cxf maven

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

cxf ×1

java ×1

maven ×1