Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344997 - "Select..." button for Goals in m2e "Run Configurations" always shows "No entries available"
Summary: "Select..." button for Goals in m2e "Run Configurations" always shows "No ent...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 434653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-06 12:01 EDT by Mark A. Ziesemer CLA
Modified: 2021-04-19 13:23 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark A. Ziesemer CLA 2011-05-06 12:01:47 EDT
Steps to reproduce:

1) From any Maven/m2e-enabled project, right-click, Run As, "5 Maven Build...".
2) In the "Edit Configuration" dialog that is shown, next to the "Goals" text box, click on the "Select..." button.
3) Observe that the UI hangs for a few seconds while the system exhibits high CPU, then a "Goals" dialog is shown with an empty list, above a red 'X' and a "No entries available" message.

There also is a "Use Qualified Name" checkbox that is checked by default, and unchecking it doesn't modify the result.  Typing something in the "Select Goal" textbox at the top of the dialog (assuming maybe the list is only for auto-complete) also has no effect.

Manually typing in goals, e.g. "clean package" allows a build to successfully complete as expected.
Comment 1 Mark A. Ziesemer CLA 2011-05-06 12:02:40 EDT
Using "m2e - Maven Integration for Eclipse (Incubation) 0.13.0.201104282116	org.eclipse.m2e.feature.feature.group".
Comment 2 Mark A. Ziesemer CLA 2012-02-19 22:24:03 EST
Any updates on this?  Same issue with m2e 1.0.100.20110804-1717.
Comment 3 Saeid Nourian CLA 2013-03-04 14:39:34 EST
Any updates on this? This bug seem to have been abandoned even though it's not fixed yet.
Comment 4 Igor Fedorenko CLA 2013-03-04 15:21:12 EST
I have no plans to implement this using existing maven-indexer backend, but if somebody provides a quality patch I will review and apply it.
Comment 5 Mark A. Ziesemer CLA 2013-03-05 19:39:57 EST
Until if/when this is properly fixed, can the "Select..." button at least be hidden or removed?  As-is, it looks like a rather glaring bug, instead of missing functionality.  (Is there ever a case where this dialog will be populated, without first fixing something else?)
Comment 6 martin naughton CLA 2013-03-12 19:20:35 EDT
Hey guys,
        I have had this problem for a few releases. I keep forgetting it is a bug and search all over the internet to find the fix. Keep returning to this bug.

I think the best solution for now is to remove the select button so people know they have to enter the entries themselves. It would save people time searching the internet to fix this problem that they can not fix.

My Version
 m2e   1.2.0.20120903-1050	
Eclipse Version: 3.8.1
Comment 7 Saeid Nourian CLA 2013-03-13 09:37:01 EDT
Couldn't agree more. I also thought that I did not have the option of simply typing a maven command there. That button should be removed indeed.
Comment 8 Igor Fedorenko CLA 2013-09-29 09:41:38 EDT
Please consider contributing a quality patch. No immediate plan to work on this otherwise.
Comment 9 Mark A. Ziesemer CLA 2013-09-29 11:32:21 EDT
Are there any other reasons to keep this "Select.." button?  (I.E., does it have any other usages or purpose that I might not be aware of?)  Or might a patch to simply remove this button be the most appropriate here?
Comment 10 Igor Fedorenko CLA 2013-09-29 12:16:03 EDT
If goals lookup is completely broken, then yes, removing the button seems reasonable.
Comment 11 Konrad Windszus CLA 2014-04-16 10:04:16 EDT
If there is no one coming up with a patch, can that button please be removed?
Comment 12 Igor Fedorenko CLA 2014-05-12 11:12:30 EDT
*** Bug 434653 has been marked as a duplicate of this bug. ***
Comment 13 Dinis Cruz CLA 2014-05-12 11:21:09 EDT
What would be the best way to fix this?

I guess the question is really, "how can the eclipse m2e list/access the currently available lifecycle and goals for the current selected eclipse project?"

Would it be via:

a) information on the pox.xml or 'Effective POM'? (btw, is there an in-memory representation of these objects?)
b) executing 'mvc' on the console (or in memory) and parsing the error message shown?

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]

Question on b), is there a maven command to list the currently available lifecycles and goals?
Comment 14 Igor Fedorenko CLA 2014-05-12 11:57:45 EDT
Maven supports two types of goals: lifecycle phase names and maven plugin goals. 

Available lifecycle phase names come from the default lifecycle, which is part of maven core, but can also come project build extensions. It is probably ok to ignore project build extensions. Default lifecycle changes very infrequently, so it is probably okay to simply hardcode the names/

List of available plugin goals, on the other hand, depends on contents of maven repositories accessible by the project and there is currently no reliable and efficient way to get the list.

As was suggested in comment #5, the easiest fix is probably to disable or remove the button.
Comment 15 Lars Vogel CLA 2014-08-11 08:57:12 EDT
(In reply to Igor Fedorenko from comment #14)
> As was suggested in comment #5, the easiest fix is probably to disable or
> remove the button.

This is a possible patch, I created it without testing it. (I face the issue described in Bug 441506, once I get over this I can validate this patch to see if does what I think it does).

https://git.eclipse.org/r/31380
Comment 16 Igor Fedorenko CLA 2014-08-14 13:55:57 EDT
Applied the patch, thank you.
Comment 17 Denis Roy CLA 2021-04-19 13:23:51 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/