Problem with running wsimport Ant task w/Java 11

Hi all

I have a following snippet in my build.gradle that works fine under Java 8, but fails under Java 11:

configurations {

dependencies {
    jaxws group: 'javax.jws', name: 'javax.jws-api', version: '1.1'
    jaxws ''

task wsimportInput {


    doFirst {
        mkdir 'build/generated/wsdl'

    doLast {
        ant.taskdef(name: 'wsimport',
                classname: '',
                classpath: configurations.jaxws.asPath)
                wsdl: 'src/main/resources/wsdl/input/myservice.wsdl',
                package: 'my.package.wsdl.input',
                sourcedestdir: 'build/generated/wsdl',
                xnocompile: 'true',
                disableAuthenticator: 'true',
                xdebug: 'true'
        ) {

task wsimport() {


So, under Java 8 this works fine and generates necessary classes. However, under Java 11, this is error I am getting:

[ant:wsimport] Caused by: C:\Users\myname.gradle\daemon\6.4.1\src\main\resources\wsdl\input\myservice.wsdl (The system cannot find th
e path specified)

So, apparently, relative path, specified in Ant task definition, is being turned into wrong absolute path, when run under Java 11. How can I debug/troubleshoot this issue? Which Gradle component is responsible for “absolutizing” relative paths in this case?

Ehm, actually this is a known problem in Gradle with Java 9+:

So I’ve just replaced my definition with

 wsdl: project.file('src/main/resources/wsdl/input/myservice.wsdl'),

and now it works!