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.
When deleting a Java EE project from NetBeans (war, ear, ...) if the user choses the option to delete files from filesystem and that project is still deployed, the app server may end up in an unstable state (especially with GlassFish v1). The delete project dialog should at least mention to the developer that he should undeploy first the application before deleting it if not force/help him doing so.
This is a real bug. Undeploy should be called if the server is running. If the server is not running, the server at startup should detect the app is not there anymore, emit a warning in the log and clean it up. If it does not, file a bug on the server.
Tomas was just looking into a similar issue recently.
Unfortunately there's no API for Undeploy action as well as for checking if the server is running or not. See issue 113023 against j2eeserver.
*** Issue 114905 has been marked as a duplicate of this issue. ***
API for Undeploy action still missing => TM future.
I think phejl resolved this... but I will let him update the issue, since I might not understand the situation completely.
The clean target is now undeploying the application if server is running. Clean is called before deletion - closing the issue as fixed.