This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 49533

Summary: clean fails if the module was deployed
Product: javaee Reporter: Pavel Buzek <pbuzek>
Component: Web ProjectAssignee: Pavel Buzek <pbuzek>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: avk
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Pavel Buzek 2004-09-24 19:05:47 UTC
Some files are locked by server and cannot be deleted.
Comment 1 Pavel Buzek 2004-09-24 19:06:07 UTC
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. 
Comment 2 zikmund 2004-09-24 19:28:58 UTC
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?
Comment 3 Pavel Buzek 2004-09-25 00:57:21 UTC
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 ***