Ant task wsgen fails with JDK11

Hi there,

I have a ant wsgen task defined to create artifacts for an JAX-WS deployment.

The following code was working fine with JDK1.8 and fails with JDK11, Please suggest:


configurations {

dependencies {
project.dependencies.jaxws ''

ant.taskdef(name: 'wsgen', classname: '', classpath: project.configurations.jaxws.asPath)

       webServices.each { service ->
                keep: true,
                destdir: <dest dir with .class files>,
                sourcedestdir: <src dir with .java files>,
                resourcedestdir: wsdlDir,
                genwsdl: 'true',
                classpath:  <dest dir with .class files>,
                protocol: 'Xsoap1.2',
                extension: 'true',
                inlineSchemas: 'true',
                sei: ',
                verbose: 'true'

Now my file:

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(portName = "TestPort")

public class sampleService1 {
    public String sayHello(String str) {
    final StringBuilder output = new StringBuilder();
    return output.toString();

When i run the above code, i get wsgen failed error.

Please suggest.

You missed to provide the error you are getting.
Best guess, it uses some class that was removed in Java 11 and you need to add an external dependency that provides those classes instead.