Some files are locked by server and cannot be deleted.
I think the right solution would be to undeploy the module first if it
was deployed. Bad thing is we probably cannot do this automatically -
or can we? If you never deployed the module or even do not have the
server started you do not want to slow down the clean (even just by
testing _is_server_running_ and _is_module_deployed_ - the first one
takes 3 seconds and cannot be speedup by any simple fix, while clean
can be done in an instant). Not speaking of chances that the clean
fails for some problem with undeployment.
Of course it would be possible to add a check box (project property) -
yes, another one - saying "undeploy before clean" and provide an
undeploy task in build script that can also be used by adventurous
users who choose to customize the build script.
Pavle, it seems as duplicate of issue 48890 (and similar to issue 47919).
BTW: I think that the _is_server_running_ and _is_module_deployed_ can
be used from current IDE history: IDE would use its knowledge if it
ran Tomcat and if it deployed the WebApp. It's only a heuristic but in
most cases it will work. What do you think?
This is really a duplicate of 47919.
The heuristic for is server running cannot be used because it will not
work in case the tomcat server was started externally. That is quite
likely for servers added by user. Anyway, we had this discussion
before since the same problem is in Server Registry when we have to
display progress bar for the test if server is running. So it is
pointless to repeat the same arguments.
*** This issue has been marked as a duplicate of 47919 ***