jax-ws-commons
  1. jax-ws-commons
  2. JAX_WS_COMMONS-117

Specifying project.build.sourceEncoding causes wsimport to fail

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:

      maven 3.0.4, Win XP & RHEL6, Java 1.7.0_40, jaxws-maven-plugin 2.3 & 2.3.1-b03

      Description

      Adding source encoding to a POM:
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

      Causes wsimport to fail:
      [INFO] jaxws:wsimport args: [-keep, -s, 'C:\<source>\trunk\target\generated-sources\wsimport', -d, 'C:\<source>\trunk\target\classes', -verbose, -encoding, UTF-8, -extension, -Xnocompile, -target, 2.1, -b, 'C:\<source>\trunk\src\main\resources\jaxb2Bindings.xjb', "file:/C:/<source>/trunk/src/main/webapp/wsdl/<ourwsdl>.wsdl"]
      unrecognized parameter -encoding

      Pom build plugin section:
      <plugin>
      <groupId>org.jvnet.jax-ws-commons</groupId>
      <artifactId>jaxws-maven-plugin</artifactId>
      <version>2.3.1-b03</version>
      <executions>
      <execution>
      <goals>
      <goal>wsimport</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      <bindingFiles>
      <bindingFile>$

      {project.build.outputDirectory}/jaxb2Bindings.xjb</bindingFile>
      </bindingFiles>
      <wsdlDirectory>${project.build.outputDirectory}

      /wsdl</wsdlDirectory>
      <extension>true</extension>
      <target>2.1</target>
      <verbose>true</verbose>
      </configuration>
      </plugin>

      You will notice that I have also tried the -Xnocompile just in case that helped, but it didnt.

      If the sourceEncoding setting is removed from the POM the incorrect -encoding parameter is not generated and the tool executes ok.

        Activity

        Hide
        shelly2k added a comment -

        Sorry, further research. I have discovered in a child pom the following section added to the plugin section:

        <dependencies>
        <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-tools</artifactId>
        <version>2.2.5</version>
        </dependency>
        </dependencies>

        Removing this dependency fixed the issue.

        Show
        shelly2k added a comment - Sorry, further research. I have discovered in a child pom the following section added to the plugin section: <dependencies> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-tools</artifactId> <version>2.2.5</version> </dependency> </dependencies> Removing this dependency fixed the issue.
        Hide
        Lukas Jungmann added a comment -

        at least version 2.2.6 of jaxws-tools is needed for encoding parameter to work

        Show
        Lukas Jungmann added a comment - at least version 2.2.6 of jaxws-tools is needed for encoding parameter to work

          People

          • Assignee:
            Lukas Jungmann
            Reporter:
            shelly2k
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: