Open penn5 opened 1 year ago
same issue, different manifestation, this is my root error
Unable to find build service with name 'jaxbJavaGenCatalogue'.
For me it's not even working when I have the configuration-cache directory cleared. I tried some hacky workarounds with registering the service by hand, but nothing worked :(
I think it might have something to do with this issue: https://github.com/gradle/gradle/issues/24085
Why are you doing that weird function override at https://github.com/IntershopCommunicationsAG/jaxb-gradle-plugin/blob/master/src/main/kotlin/com/intershop/gradle/jaxb/task/SchemaToJavaTask.kt#L374
I forked the repo, removed that method and added this.usesService(serviceProvider)
when configuring SchemaToJava task.
Everything works, but I admit I have no idea why you're doing it your way in the code I mentioned.
According to the doc, ant tasks are not fully compatible with the configuration cache https://docs.gradle.org/current/userguide/ant.html.
Ant integration is not fully compatible with the configuration cache. Using Task.ant to run Ant task in the task action may work, but importing the Ant build is not supported.
When using the gradle configuration cache, I receive the error
Unable to find build service with name 'jaxbJavaGenSchema'.
The issue occurs using the sample configurations shown in the README.
I think that Gradle is caching the phase of configuration that registers this build service, so it needs to be registered in a place that is not cached. See https://docs.gradle.org/current/userguide/configuration_cache.html.