1

Is the wsdlDirectory setting in maven supposed to have an effect? I am finding that the setting:

<wsdlDirectory>${basedir}/src/main/resources/wsdl/</wsdlDirectory> has no effect.

Executing the command below

mvn -X clean:clean jaxws:wsimport

always results in the output below, unless the wsdl files are moved to /home/projects/amazon/fps/trunk/src/wsdl

[DEBUG] The wsdl Directory is /home/projects/amazon/fps/trunk/src/wsdl
[DEBUG] The binding Directory is /home/projects/amazon/fps/trunk/src/jaxws
[DEBUG] The wsdl Directory is /home/projects/amazon/fps/trunk/src/wsdl
[INFO] Nothing to do, no WSDL found!

I am using 2.2.1 on my Debian build machine and Embedded maven 3.0.2 on my Windows 7 Eclipse environment.

My pom.xml is as follows (irrelevant bits removed):

<project xmlns="..." xmlns:xsi="..." xsi:schemaLocation="...">
    <dependencies>
    </dependencies>
    <build>
        <plugins>
    <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jaxws-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>AmazonFPSImport</id>
                <goals>
                        <goal>wsimport</goal>
                    </goals>
                    <configuration>
                        <wsdlDirectory>
                            ${basedir}/src/main/resources/wsdl/
                        </wsdlDirectory>
                        <wsdlFiles>
                            <wsdlFile>AmazonFPS.wsdl</wsdlFile>
                        </wsdlFiles>
                        <wsdlLocation>/wsdl/AmazonFPS.wsdl</wsdlLocation>
                        <sourceDestDir>
                            ${basedir}/target/generated-sources/amazon/
                        </sourceDestDir>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
    </build>
</project>

1 Answers1

1

Try moving the configuration section outside the <execution> tags. Or, bind to a specific phase

<executions>
    <execution>
        <phase>generate-sources</phase>
        <goals>
            <goal>generate</goal>
        </goals>
    </execution>
</executions>
artbristol
  • 32,010
  • 5
  • 70
  • 103
  • Binding to a specific phase did not work. However moving outside the `` tag did work. Would you be so kind as to explain the voodoo behind this? In other words what exactly is it that I have just done? –  Feb 28 '12 at 12:20
  • I'm not totally sure but the answer and links from this question might shed more light http://stackoverflow.com/questions/3166538/how-to-execute-maven-plugin-execution-directly-from-command-line – artbristol Feb 28 '12 at 12:22