Import gradle project and generate WSDL sources

Answered

Hi,

 

I have a gradle project where sources are generated from a WSDL file.

 

```
apply plugin: "cz.swsamuraj.jaxws"
...
jaxws {
wsdlDir = 'src/main/resources/META-INF/wsdl'
wsdlLocationDefault = true
generatedSources = 'src/gen/ws'
packageName = 'smarter.ecommerce.commons.vat.validation.generated'
extension = true
}
```

 

This works perfectly fine. Intellj recognices the sources and everybody is happy.
The only problem is, that we have to trigger this import step at least once manually with `./gradlew wsimport` to generate those sources. 
This is very annoying because every developer has to do this because else the project isn't compiling.
Is there a way to automate this with gradle. I want, that a refresh of the gradle project results in rebuilding those sources. 

0
5 comments

You can set any Gradle task to run after sync:

0
Avatar
Permanently deleted user

That's nice but it requires that all developers setup this step manually once.
Is it somehow possible to install this somehow in the gradle file. This avoids that anybody have to do something manually.

0

I'm afraid, there is no way to do it.

You can consider sharing the project files with the developers so that the Execute After Refresh setting is enabled out of the box.

1
Avatar
Permanently deleted user

Thanks. I consider the second option (sharing project files) because we could tackle a few other inconveniences with that.

0

Please sign in to leave a comment.