nilsmagnus / wsdl2java

Gradle plugin for generating java source from wsdl files
MIT License
142 stars 77 forks source link

Should remove temDir after we done copy. Unnecessary duplicate #65

Open mozinrat opened 6 years ago

mozinrat commented 6 years ago

https://github.com/nilsmagnus/wsdl2java/blob/6d5563df05fb0d6c93ad2fbe1f86c4cd0baf6381/plugin/src/main/groovy/no/nils/wsdl2java/Wsdl2JavaTask.groovy#L89 Post this line we should have tmpDir.deleteDir() Else in buildDir we see duplicate folder of generated-src and wsdl2Java.

Opened PR https://github.com/nilsmagnus/wsdl2java/pull/66 for the same

SavcuksMihails commented 6 years ago

Hi,

Having the same problem - regardless of generatedWsdlDir option value, plugin ALWAYS generates (in build directory) additional (redundant) folder with name= "wsdl2java", that contains another folder with strange name (md5?) = "31c309a3eeb5ad487dc5633ddfe1ebc4" and deeper by hierarchy, where java files live.

Like that: image

Nothing can do with that... Is it planned to fix that?

jskov-jyskebank-dk commented 6 years ago

Why is it a problem? The build folder contains transient data. It is just trash.

SavcuksMihails commented 6 years ago

Maybe its not a problem indeed. Just a bit weird to see duplicated data. By investigating plugin code, I thought that plugin developer just forgot to delete this folder (as described in initial issue comment).

jskov-jyskebank-dk commented 6 years ago

Gradle uses the content of the output folder to determine if a task need to be executed.

So if the build output folder is removed (or its contents changed), the task will run again.

One could generate the output directly to the desired target folder. But then Gradle would hash everything in that folder to determine if the task needed to run. Also files not related to the task. So the task may have to re-run after unrelated side-effects to the target directory.