Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336777

Summary: Working set projects duplicated in working set view where maven sub-module on same level as parent
Product: z_Archived Reporter: Frank <sweetfa>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, igor, kawazu, prakash, pwebster
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
sample screenshot none

Description Frank CLA 2011-02-09 22:52:45 EST
Build Identifier: 20100917-0705

If I create a maven parent module, and then create a maven sub-module, with the sub-module being on an equivalent directory level as the parent module (the relativePath in the sub-module set as ../parentProject) the sub-module project appears twice when viewing in working set view.

This happens in any working set type (windowed, non-windowed, etc).

I have only repeated this problem with maven sub-modules on a relative level.

Perhaps this bug needs to be moved to the m2eclipse plugin bug list but am unsure of the cause.

Reproducible: Always

Steps to Reproduce:
1.Create maven parent module with m2eclipse plugin
2.Create maven sub-module at same directory level as parent module
3.Switch to working set view (duplicate entries of sub-project exist)
Comment 1 Prakash Rangaraj CLA 2011-02-09 22:57:00 EST
Don't think this one is an Eclipse bug. Please reopen if you find the steps to reproduce in Eclipse SDK.
Comment 2 Paul Webster CLA 2011-02-10 07:57:25 EST
Sending to m2eclipse to investigate ... how do they interact with working sets?

PW
Comment 3 Kristian Rink CLA 2011-02-10 10:23:52 EST
Seeing the same problem here, still got to try reproducing it in plain Eclipse. Definitely happens with m2eclipse / maven projects.
Comment 4 Igor Fedorenko CLA 2011-02-10 23:30:02 EST
I need help understanding the problem.

What is "windowed, non-windowed, etc" working set type? How do I switch to "working set view"? Some screenshots would be useful here.

Also, are you able to reproduce the problem with recent m2e 0.13.0 builds installed on vanilla "classic" or "java" eclipse distribution? actually, m2e is part of 3.7M5 java distro already, no need to install anything.
Comment 5 Kristian Rink CLA 2011-02-11 02:29:53 EST
Created attachment 188742 [details]
sample screenshot
Comment 6 Kristian Rink CLA 2011-02-11 02:40:10 EST
Added a screenshot. Basically, the problem is all the same: Using working sets in my current installment of Eclipse 3.6 ends things up look like this - projects doubled inside the working sets. I have three kinds of working sets at the moment, one for keeping track of my backend (Java EE, exclusively maven2 war, jar, pom, somewhat next to 30 projects) artifacts, one keeping track of my frontend projects (Eclipse RCP, Eclipse RAP, mostly Eclipse plug-in projects, some Eclipse/maven tycho projects, also around 30 projects), and one as a "playground" for experimental stuff (mostly maven2 projects). It's the same in both: 

Having "Top Level Elements" in "Project Explorer" view set to "Projects", all projects appear just once, yet unsorted.

Having "Top Level Elements" in "Project Explorer" view set to "Working Sets", I see all the projects grouped into the appropriate working sets, but each working set shows each project twice.

Note that I am not sure whether or not this really is an issue related to maven2, I have been pointed here on eclipse.newcomer and, reading the description, the problem outlined here seems to resemble my problem as I also, in some field ("parentProject" in eclipse/maven/tycho projects) have a similar setup. I will try reproducing the same using a more-or-less plain 3.7M5 later today, but at the moment, my Eclipse installation is pretty much filled with things I use / need on a daily basis (m2eclipse, svn, spring tooling, aptana python and jruby stuff, glassfish and jboss server tools, rap development tooling, google/instantiations swt designer,  ...), so I am unsure whether this could be narrowed down to m2eclipse. Don't see any meaningful log file messages, though... Feel free to check back with me if there are any more information I can provide about that...
Comment 7 Prakash Rangaraj CLA 2011-02-11 02:44:02 EST
The image shows that you are using Java Working Set. Not sure whether duplicate entries are allowed in them. CC-ind Dani for comments
Comment 8 Dani Megert CLA 2011-02-11 04:54:58 EST
(In reply to comment #7)
> The image shows that you are using Java Working Set. Not sure whether duplicate
> entries are allowed in them. CC-ind Dani for comments
The API IWorkingSet.setElements(IAdaptable[]) doesn't seem to make a restriction. In JDT we check at least at the UI level that duplicates aren't possible and JDT does not implement IWorkingSet.
Comment 9 Kristian Rink CLA 2011-02-11 05:04:07 EST
Created a new "Resource" working set and adding the projects shown in the screenshot, I had to learn that "Resource" working sets don't "suffer" from this behaviour - in the "Resource" working set, each project shows up just once. Not sure whether this information is of help, though.
Comment 10 Igor Fedorenko CLA 2011-02-11 09:22:14 EST
We need steps to reproduce the problem using a recent m2e 0.13.0 build (eg, https://repository.sonatype.org/content/repositories/forge-sites/m2e/0.13.0/N/0.13.0.201102102203/) and vanilla classic or java Eclipse distro. Either Eclipse 3.6 and 3.7 should do.


Implementation-wise, m2e only adds projects to working set(s) during initial project import/creation. Right now I can't think of a scenario how m2e can add the same project more than once to a working set, unless the project is somehow created/imported multiple times. Even though m2e does not currently check for duplicate working set members (see #addToWorkingSets below) I am not comfortable changing implementation until I understand what is going on.

http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/AbstactCreateMavenProjectJob.java
Comment 11 Kristian Rink CLA 2011-03-17 04:52:04 EDT
Problem not reproducible on vanilla, recent 3.7 milestone build.
Comment 12 Frank CLA 2011-04-07 02:30:51 EDT
I have tracked this problem down to the installation of the Oracle OEPE 11.1.1.7 set of plugins.

After addition of this feature the working sets issue starts.

Not sure that this is the correct place to log this bug but if someone on the list knows the correct way can they please forward it on to the appropriate persons.
Comment 13 Igor Fedorenko CLA 2011-04-07 11:10:48 EDT
You need to talk to Oracle OEPE (whatever that is) support and/or developers. m2e development team is not able to troubleshoot thirdparty  and I assume commercial products.
Comment 14 Denis Roy CLA 2021-04-19 13:23:01 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/