Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert extension 'wsdl2java' to a task #34

Open
thomasq0 opened this issue May 10, 2024 · 0 comments
Open

Cannot convert extension 'wsdl2java' to a task #34

thomasq0 opened this issue May 10, 2024 · 0 comments

Comments

@thomasq0
Copy link

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:

dependsOn tasks.wsdl2java

dependsOn tasks['wsdl2java']

Appreciated if someone can explain what was wrong and suggest a workaround.

My running environments:

gradle -v

------------------------------------------------------------
Gradle 8.7
------------------------------------------------------------

Build time:   2024-03-22 15:52:46 UTC
Revision:     650af14d7653aa949fce5e886e685efc9cf97c10

Kotlin:       1.9.22
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          1.8.0_412 (Homebrew 25.412-b00)
OS:           Mac OS X 14.4.1 x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant