wsdl2java icon indicating copy to clipboard operation
wsdl2java copied to clipboard

Copy to target folder does not overwrite classes

Open aldobazzi opened this issue 4 years ago • 0 comments

Hi all

We have the following situation in our project. We have multiple versioned wsdl's. Some of the wsdl's generate the same target classes in the same package. We want to use the latest/last generated version of those classes.

When generating the java classes with the wsdl2java task, sometimes the task while in the loop does not overwrite the target generated classes with later versions, which can then lead to further compilation issues.

The reason for this is that the used ant copy task (https://ant.apache.org/manual/Tasks/copy.html) only overwrites the target if the source is newer, considering the file system's last modified date granularity. For some file systems the granularity is only on one second precision. Hence, if the generation is faster, it does not overwrite the target with later versions.

A configuration flag to set the overwrite option for the ant copy task would be helpful or otherwise a flag to at least not delete all the target folders when the wsdl2java task is executed (in this way it would be possible to manually trigger the task for each wsdl).

I would be happy to provide a pull-request.

aldobazzi avatar Aug 17 '20 08:08 aldobazzi