Community
Participate
Working Groups
If you have a root project R and a subproject S and store a launch configuration as a file under S, this launch configuration will be listed twice in the list of launch configs. This has been a bug for a long time, as is evident from the following m2e bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=398523 That report was closed as WONTFIX due to the problem not being fixable from m2e. It is also not exclusive to Maven. Gradle projects can exhibit the bug as well.
I would argue that this is mostly an issue for the Debug view. The hierarchical view is only a view, and we can't really do it differently in Platform, so the artifacts are duplicated in the "model" for each project containing them. The Platform has a way to use Resource filters to avoid that, and you can enable them for m2e in Preferences, but I don't know how well m2e work with them. On Platform side, we can try to keep tackling such issue on the "view" side, by filtering out .launch config that back to the same filesystem location.
I don't see how this is specific to the debug view, unless you count the list of run configurations as part of the debug view. I don't think the bug has anything to do with m2e. It's just that Maven projects tend to be hierarchical, meaning most of the time this bug occurs, it's in a Maven project. To be clear, the launch config doesn't have to be a Maven launch config. Any type of launch config will do. Adding a resource filters is tedious. Filtering out .launch files that point to the same location seems like a good idea.
(In reply to Balz Guenat from comment #2) > I don't see how this is specific to the debug view, unless you count the > list of run configurations as part of the debug view. Sorry, I used the wrong term. I said "Debug view", but I meant "Debug component" or "Debug sub-project" or "Debug Git repository". > I don't think the bug has anything to do with m2e. It's just that Maven > projects tend to be hierarchical, meaning most of the time this bug occurs, > it's in a Maven project. To be clear, the launch config doesn't have to be a > Maven launch config. Any type of launch config will do. You're right. > Adding a resource filters is tedious. Prefrences > Maven > "Hide folders of physically nested projects" should do that automatically for you.
(In reply to Mickael Istria from comment #3) > Prefrences > Maven > "Hide folders of physically nested projects" should do > that automatically for you. 1) That feature is marked experimental (as of 4.11). 2) It doesn't actually hide the nested folders, at least in my case. 3) It doesn't affect the bug. Launch configs are still listed multiple times. 4) It doesn't and can't help for non-Maven projects like Gradle or Eclipse Plugins. Note that for Gradle projects, subfolders actually are hidden but launch configs are still duplicated.
The bug was introduced since Oxygen (4.7). The issue/bug didn't exist in neon (4.6)
I think this bug is related to bug 559758, what do you think?
(In reply to Torbjörn Svensson from comment #6) > I think this bug is related to bug 559758, what do you think? I would even say it's the same bug.
I think bug 568790 would help there: by hiding the folder which is a nested project in the resource model, the included launches would probably not show in the launch configuration dialog; and only the one of the child project would show.
Duplicate entry in Debug Configuration dialog is partially solved by Bug 559758.
*** This bug has been marked as a duplicate of bug 559758 ***