I have to migrate my wsdl2java plugin from no.nils.wsdl2java to this plugin as I'm upgrading my Gradle version to 8.x.
Most of the options are easy to migrate between two plugins. But I found a weird blocker on my project build tasks.
It seems like this project's extension and task share the same name wsdl2java. As a result, it complains
> Cannot convert extension 'wsdl2java' to a task.
However, I can see the task by running gradle tasks under Build tasks section:
wsdl2java - Generates Java classes from WSDL files.
And I can run Gradle task separately: gradle wsdl2java without any issue.
I understand there was a closed issue #12 mentioning this issue too. And I understand the task is by default running before lifecycle :compileJava, hence it may not be necessary to declare the dependency between these two tasks. But there are cases where some copy actions are required after wsdl2java task. In such scenario, I have to use dependsOn to define the task order in build task.
I tried to search workaround from internet, some suggest to use TaskContainer to get the task reference, but none of the following expressions work:
I have to migrate my
wsdl2java
plugin fromno.nils.wsdl2java
to this plugin as I'm upgrading my Gradle version to 8.x.Most of the options are easy to migrate between two plugins. But I found a weird blocker on my project build tasks.
It seems like this project's extension and task share the same name
wsdl2java
. As a result, it complainsHowever, I can see the task by running
gradle tasks
underBuild tasks
section:wsdl2java - Generates Java classes from WSDL files.
And I can run Gradle task separately:
gradle wsdl2java
without any issue.I understand there was a closed issue #12 mentioning this issue too. And I understand the task is by default running before lifecycle
:compileJava
, hence it may not be necessary to declare the dependency between these two tasks. But there are cases where some copy actions are required afterwsdl2java
task. In such scenario, I have to usedependsOn
to define the task order inbuild
task.I tried to search workaround from internet, some suggest to use TaskContainer to get the task reference, but none of the following expressions work:
Appreciated if someone can explain what was wrong and suggest a workaround.
My running environments: