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 164392 - Subprojects not listed when project is closed
Summary: Subprojects not listed when project is closed
Status: RESOLVED DUPLICATE of bug 186024
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 15:26 UTC by Jiri Sedlacek
Modified: 2010-08-18 18:56 UTC (History)
2 users (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 Jiri Sedlacek 2009-05-04 15:26:05 UTC
The maven projects incorrectly report their subprojects when being closed, this caused a P2 memory leak filed as Issue
164140. Steps to reproduce:

 1/ Create Maven NetBeans Platform Application (4 projects)
 2/ Open the projects, on OpenProjects.PROPERTY_OPEN_PROJECTS change the application/pom.xml project lists two subprojects
 3/ Close the projects, on OpenProjects.PROPERTY_OPEN_PROJECTS change the application/pom.xml project lists no subprojects
Comment 1 Jiri Sedlacek 2009-05-04 15:26:49 UTC
As mentioned in Issue 164140 this doesn't follow the behavior described in SubprojectProvider.getSubprojects() API
documentation at
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/SubprojectProvider.html#getSubprojects():
application/pom.xml reports to depend on module1/pom.xml and branding/pom.xml when opened, so the projects can clearly
be considered to be dependencies of application/pom.xml and should always be listed as long as the projects
configuration is unchanged.

If the inconsistency cannot be fixed by caching the correct list of subprojects on maven project side and the current
state is considered to be correct, then this bug should be assigned to Projects/APIdocs as the current API documentation
is incorrect. I think mentioning that the list of dependencies can change during project lifecycle would be enough,
changes can be tracked using SubprojectProvider.addChangeListener(). But that would be an incompatible change, I'm afraid...
Comment 2 Jesse Glick 2009-05-04 17:05:17 UTC
As discussed in issue #164140, that bug is in Profiler and is not the responsibility of the maven module, which is
permitted to change the result of SP without notice. The API documentation says only that the list is "at the discretion
of the project" and specifies nothing about when and why the result might change. Nonetheless it would be desirable for
the result not to become the empty set merely due to projects being closed.
Comment 3 Antonin Nebuzelsky 2010-07-30 15:17:13 UTC
Reassigning to default owner.
Comment 4 Jesse Glick 2010-08-02 15:57:29 UTC
Probably should use same cache system as described in bug #186024.
Comment 5 Jesse Glick 2010-08-18 18:56:57 UTC
Would be fixed by that patch, I think.

*** This bug has been marked as a duplicate of bug 186024 ***