wsdl2java icon indicating copy to clipboard operation
wsdl2java copied to clipboard

Should remove temDir after we done copy. Unnecessary duplicate

Open mozinrat opened this issue 7 years ago • 4 comments

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

mozinrat avatar Oct 02 '17 10:10 mozinrat

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?

SavcuksMihails avatar Jan 04 '18 19:01 SavcuksMihails

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

jskov-jyskebank-dk avatar Jan 05 '18 06:01 jskov-jyskebank-dk

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).

SavcuksMihails avatar Jan 05 '18 08:01 SavcuksMihails

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.

jskov-jyskebank-dk avatar Jan 05 '18 09:01 jskov-jyskebank-dk