0

I am using cxf-codegen as a Maven plugin and it won't generate my code from the wsld. Maven tells me build success but give me the message 'Nothing to generate'

I included my complete pom file. Am I missing a dependancy?

<groupId>org.springframework</groupId>
<artifactId>gs-consuming-web-services</artifactId>
<version>0.1.0</version>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.3.RELEASE</version>
</parent>

<properties>
    <java.version>1.8</java.version>
    <cxf.version>2.2.3</cxf.version>
</properties>

<dependencies>
    <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>
    <dependency>

        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <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/generated/ebay</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>${basedir}/src/main/resources/ebaySvc.wsdl</wsdl>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Tskrad
  • 1
  • 1
  • Do not do that EVER. I mean ever, really. Never. **Never**! `${basedir}/src/main/java/generated/ebay` <-- This. NEVER. This should point to something under `target` not under `src`. `${project.build.directory}/something` – Tunaki Apr 20 '16 at 08:00
  • @Tunaki, why is that? – Tskrad Apr 20 '16 at 15:25
  • Generated content must not be version controled. It must be under `target`. – Tunaki Apr 20 '16 at 15:26
  • Could you additionally add your wsdl to the question. That we can try to reproduce it. I do not see any error in your pom. – jmattheis Apr 23 '16 at 17:08
  • @Jannis, the eBay wsdl is many thousands of lines long. Additionally I have tried other wsdls with the same result. I am fairly certain I am somehow configured wrong. – Tskrad Apr 24 '16 at 04:21
  • have you tried to use a newer version of the codegen-plugin? – jmattheis Apr 24 '16 at 08:05

1 Answers1

0

After many days of research, I have determined that CXF simply does not want to parse the wsdl correctly and I don't know enough about wsdl structure to edit it myself. I used a different implementation and got it to work.

Tskrad
  • 1
  • 1