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 109044 - When I delete an Enterprise project the EJB and WAR project are not deleted
Summary: When I delete an Enterprise project the EJB and WAR project are not deleted
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-06 20:10 UTC by ieising
Modified: 2016-07-07 08:54 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ieising 2007-07-06 20:10:10 UTC
Hi,

When I have created an Enterprise project in NB6 M10, an EJB and a WAR project are created as well. But when I delete
the Enterprise project the EJB and WAR projects are not deleted, I need to delete them separately by hand, ie via
right-click | delete.

Iwan
Comment 1 Peter Pis 2007-07-10 13:18:07 UTC
Reassigning to "j2ee" for evaluation...
Comment 2 Petr Jiricka 2007-07-10 16:22:47 UTC
The workaround is very simple, so not sure if this is a P2. Tomas, I believe Radko implemented this in the first place,
so you may want to check with him regarding whether this behavior is intentional or not.
Comment 3 Tomas Mysik 2007-07-11 15:28:50 UTC
After the discussion with Radko I'm closing this issue as WONTFIX because EAR project itself doesn't know which 
modules can/should be deleted. User can add e.g. another web module which definitely shouldn't be deleted.
According to Bug Priority Guidelines changing to P3.
Comment 4 ieising 2007-07-11 15:38:48 UTC
Well I disagree as the WAR and EJB projects I'm talking about are generated as part of the creation of the EAR project
and are subdirectories of the EAR-project directory, they 'belong' to the EAR project. Meaning that it is intuitive that
when I delete the EAR project, all are deleted.

I agree with the fact that when you add additional projects to the EAR project, they shouldn't be deleted as long as
they have a different project directory root than the EAR project. So:

MyProjects
    |
    +- MyEarProject
    |     |
    |     +- MyEjbProject 
    |     |
    |     +- MyWarProject 
    |
    +- MyOtherWarProject

should result in: 

MyProjects
    |
    +- MyOtherWarProject

After deleting MyEarProject.

Iwan
Comment 5 Radko Najman 2007-07-12 17:31:07 UTC
The delete project operation wasn't designed to delete included modules (projects), just sources and project files. This
is enough for most project types. EAR project type is an exception from this point of view because it has no sources but
it includes web or ejb projects.

To delete projects which were created together with EAR project is a little bit problematic:
- EAR project does not know which projects were created together with it, this information is not stored anywhere. EAR
project only knows which projects are included in it.
- to delete projects which are placed under EAR folder is not a good solution. There is a use case that the user can
create his own web or ejb project under EAR folder and include this project into his EAR project. So in case of deleting
projects placed under EAR folder this extra created project would be deleted too and it is not expected and wanted
behaviour.

I don't see any simple solution for 6.0 release. The right solution should probably be to display a dialog showing all
included projects and allow the user to choose which projects should be deleted and which not. But I think it is too
late to do it for 6.0 release, this kind of changes is not allowed now. I propose to postpone this issue for next
release and then discuss what should be the correct solution and if it should be done on EAR project side or generally
on project support side.
Comment 6 Tomas Mysik 2007-07-17 12:45:28 UTC
I agree with Radko. I think that this issue is more enhancement than bug...
Comment 7 Martin Balin 2016-07-07 08:54:52 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss