Search code examples
mavenjax-wsjava-15

What does Maven, jaxws:wsimport mean when it says '-Xbootclasspath/p is no longer a supported option'?


I have recently had reason to generate Java classes from a WSDL.

I am using Java 15 on Mac, Maven 3.6.3 and JAX-WS 2.3.1.

I get the error

-Xbootclasspath/p is no longer a supported option.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

When trying to generate my sources. What would cause this? and how do I fix it?


Additional info:

My dependencies includes

  <dependency>
      <groupId>javax.xml.ws</groupId>
      <artifactId>jaxws-api</artifactId>
      <version>2.3.1</version>
  </dependency>
  <dependency>
      <groupId>com.sun.xml.ws</groupId>
      <artifactId>jaxws-rt</artifactId>
      <version>2.3.1</version>
      <type>pom</type>
  </dependency>

My JAX-WS plugin is defined/configured as

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>jaxws-maven-plugin</artifactId>
    <version>2.5</version>
    <executions>
        <execution>
            <id>wsimport-from-jdk</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>wsimport</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
      <wsdlFiles>
        <wsdlFile>
          ${basedir}/src/main/wsdl/my-wsdl.wsdl
        </wsdlFile>
      </wsdlFiles>
        <packageName>com.example.client</packageName>
        <sourceDestDir>src/main/java</sourceDestDir>
    </configuration>
  </plugin>

It can find my WSDL file. Maven says

[INFO] Processing: file:/Users/user/Development/projects/example/src/main/wsdl/my-wsdl.wsdl

in the logs, before the error.


Solution

  • wsimport was deprecated and replaced in Java 11.

    The plugin has been updated to a new version that works with later versions of Java.

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>2.6</version>
        ...
      </plugin>
    

    will work