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 236721 - Required Projects contains modules from previously-opened projects
Summary: Required Projects contains modules from previously-opened projects
Status: RESOLVED DUPLICATE of bug 203222
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-03 19:41 UTC by _ gtzabari
Modified: 2013-10-03 22:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2013-10-03 19:41:23 UTC
This was originally reported by someone else (as far back as 2007) in bug #120298 but I've only now found a way to reproduce it:

Product Version: NetBeans IDE Dev (Build 201309270002)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. Take a Maven project with sub-modules at NetBeansProjects/A
2. Copy it to NetBeansProjects/B
3. Open Netbeans with a clean userdir.
4. File -> Open Project
4. Select project A. Notice that "Required Projects" lists the correct sub-modules.
5. Open project A. Close project A.
6. File -> Open Project
7. Select project B. Notice that "Required Projects" lists sub-modules from *both* A and B.

Expected behavior: "Required Projects" should only list sub-modules from project B in step 7.
Comment 1 Milos Kleint 2013-10-03 20:08:00 UTC
duplicate of issue 203222

the problem is the vague definition of subproject/required projects. in maven projects, pom projects get their subprojects from <modules> section while other packagings attempt to get the mapping from dependencies and match them against known project GAVs which are at the old location.

*** This bug has been marked as a duplicate of bug 203222 ***
Comment 2 Milos Kleint 2013-10-03 20:15:46 UTC
if you need to work with multiple sets of projects at different locations (multiple checkouts/clones) that share the same maven GAV, the working solution is to use project groups I believe. since 7.4 we reset the remembered GAV<->project dir mapping on project group change.
Comment 3 _ gtzabari 2013-10-03 22:29:47 UTC
Wow. How long has *that* feature existed without me knowing about it?! I've never even heard of Project Groups before! Thanks for the head's up, I'll check it out.

PS: The UI should be improved to highlight the existence of project groups somehow.