Community
Participate
Working Groups
Created attachment 196273 [details] "Run As" menu showing Maven options. The context menu in the Java Editor shows a bunch of Maven options under "Run As..." that don't make sense to me. These feel really out of place. Shouldn't they only be presented when a pom.xml file is selected? Steps to repeat: 1. Download "Eclipse IDE for Java Developers" Indigo, RC1 [1]. Install, and run with a new workspace. 2. Create a Java Project, and Java class. 3. Right click in the Java Editor, select "Run As >" or "Debug As >" or, highlight the class in the Package Explorer with similar results. I'll post a screen shot. [1] http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/RC1/eclipse-java-indigo-RC1-linux-gtk.tar.gz
This is a bug, m2e launch actions should only be enabled for pom.xml files and their immediate IContainers. and I swear I tested this exact scenario and did not have these menu items. but now they are there. a mystery.
Created attachment 196284 [details] proposed fix The problem only happens when m2e was not activated and this is why I missed it in my tests. Attached patch changes Maven launch shortcut enablement to behave correctly regardless of m2e bundles activation state. See patch comment for more details about the problem and the solution. Also opened follow-up bug 346803 to review other possible cases where enablement may behave unexpectedly when m2e bundles are not active.
You could solve that problem using the forcePluginActivation argument. For instance: ... <test property="org.eclipse.m2e.launchable" forcePluginActivation="true"/> ... See https://bugs.eclipse.org/bugs/show_bug.cgi?id=130338
No. This would force pretty much unconditional eager activation of m2e.core.ui and possibly m2e.core bundles. We don't want that.
Pushed my changes. http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=07ade30212d3d27c405a28d1d24dad850c9dbd12
Moved to https://github.com/eclipse-m2e/m2e-core/issues/