Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354289 - Run As Maven package is missing
Summary: Run As Maven package is missing
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 562614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-09 14:33 EDT by Tim Ames CLA
Modified: 2021-04-19 13:25 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Ames CLA 2011-08-09 14:33:38 EDT
Build Identifier: 20110615-0604

Right-clicking the project and selecting the Run As menu there used to be a "Maven package" option in 3.6 (Sonatype version). This is now missing. I did do a Convert To Maven Project, and Update Project Configuration. I also tried by creating a new workspace in 3.7 and created a new Maven project, but the option still did not show. I did this just in case there was some conflict with a 3.6 workspace.

Workaround is to create a Run Configuration for a Maven Build using "package" as a goal. I have to create one for each project. Having it on the Run As menu was much more convenient.

Reproducible: Always

Steps to Reproduce:
1.In a maven project, right click on the project
2.Open the Run As menu
3.The "Maven package" option is missing
Comment 1 Igor Fedorenko CLA 2011-08-09 14:55:56 EDT
FYI, we plan to get rid of all static RunAs->MavenNNN entries except Build... but introduce history of most recently executed maven builds. There are no plans to (re)introduce additional static RunAs->MavenNNN entries.
Comment 2 amiDDima CLA 2012-08-31 11:23:37 EDT
What should i say? Do you still want that m2e is gonna being used?

If m2e people will continue to do that way, there will be soon an another eclipse maven plugin which is going to serve the needs of people.

When you develop m2e you may not think like maven developers did or maybe still do: "maven/m2e is gonna being used only for java projects". In fact the reality is maven has replaced ant. And as you know ant was used to build everything. So m2e should not just provide workspace resolution and that's it...

Its very annoying if you have to switch to console just for doing a fast "mvn  package" test or define run configurations for tons of projects. This is then explicitly needed for projects that are not some kind of 'simple java' (jar, war, ...).

P.S.: And please do one of the following:
1. Remove support for external maven installations
2. Support external maven installations properly.

To 1.:
This will probably increase the speed people stop using m2e and itroduce some "maven 2"-version of it or whatever.

To 2.:
If it is said "use maven 2" than use maven 2 for everything (also workspace resolution and so on). People CANT switch in 5 minutes from maven 2 to maven 3 but applying maven 3 gives tons of compile errors as for example some poms of plugin dependencies can be maven-3-incompatible. And you may not have the time to adapt this plugin at this point and so on.
Comment 3 Igor Fedorenko CLA 2012-08-31 15:05:10 EDT
You do know that you can run package (or, better yet, "clean package") through RunAs->MavenBuild..., right?
Comment 4 Igor Fedorenko CLA 2013-09-28 23:55:24 EDT
I plan to eventually get rid of all predefined run-as->maven launch configurations.
Comment 5 amiDDima CLA 2013-10-07 06:10:12 EDT
(In reply to Igor Fedorenko from comment #4)
> I plan to eventually get rid of all predefined run-as->maven launch
> configurations.

How about a kind of community process to decide such things?
Comment 6 Igor Fedorenko CLA 2013-10-07 07:30:29 EDT
Adding more and more commands to Run-As menu does not scale. I am willing to bet most of existing predefined commands are never used for the same project, so they just clutter the UI. And, obviously, it is not possible to add all useful "mvn xxx" commands and their permutations to Run-As menu. This is a usability problem and I don't want to make it worse. Please provide a quality patch that improves usability of Run-As Maven UI and I'll review the patch and give my feedback.
Comment 7 Rob Newton CLA 2014-09-02 02:05:26 EDT
Thanks to the original poster about this bug.  I've been using m2e for many years and have always been baffled by mvn package missing.  Glad to see I am not alone.

Currently I make a generic Run Configuration that will package the current project:
Name:  mvn package
Base Dir:  ${project_loc}
Goals:  package

When the m2e menu items for install and clean are eventually removed (as advised by Igor) I will do likewise for them.

Once you create these generic run configurations for standard maven commands and use them once, you then have them in your Run History so you can execute them easily enough.

I can see Igor's point of view but having all the fundamental maven commands in the menu would be a good thing.
Comment 8 Fred Bricon CLA 2020-04-29 11:49:41 EDT
*** Bug 562614 has been marked as a duplicate of this bug. ***
Comment 9 Denis Roy CLA 2021-04-19 13:25:57 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/