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

Bug 334482

Summary: [wizard] improve handling of packaging types
Product: z_Archived Reporter: Pascal Rapicault <pascal>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 CC: mkleint, pascal, vladt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Pascal Rapicault CLA 2011-01-16 11:12:45 EST
In the new project wizard or in the editor while doing completion, a list of packaging types is proposed.
However most of these packaging types are not "supported" out-of-the-box in that no lifecycle mappings are installed which means that when the project is created it is created with a red X.
Admittedly this is a weird user experience.

Instead, I'm proposing that the drop down only features the packaging types that are known to be handled (still allow packaging types to be filed in) and that a link to the store be provided.
Comment 1 Milos Kleint CLA 2011-01-27 08:41:18 EST
please define "known to be handled".

We do support maven-plugin for example, but still we get an error after project creation. Apparently the build/goals gets executed and we end up with a build error saying there are no mojos defined in the project. 

So I've kept just jar/pom/war (in this order, hardwired) for now.

http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=263ff23310e5e34df300568530444264def13b69
Comment 2 Paul Tatavu CLA 2011-01-27 16:18:32 EST
I believe a much better solution would be to compute the list of "supported" packaging types by looking into the installed extensions and in the default lifecycle mapping metadata.

Even better if we can to that list any packaging types mapped in lifecycle mapping metadata embedded or referenced in the current pom or parent poms.
Comment 3 Paul Tatavu CLA 2011-01-27 16:20:44 EST
Errata to my previous comment:
Even better if we can add to that list any packaging types mapped in lifecycle
mapping metadata embedded or referenced in the current pom or parent poms.
Comment 4 Milos Kleint CLA 2011-01-28 03:13:26 EST
well, supported by lifecycle management is not the only constraint.

if we have tycho support around, still setting packaging to "eclipse-plugin" results in error, simply because the relevant <plugin>/<extensions> section is missing in the pom.

we can do what vlad suggests but IMHO not worth the effort.
Comment 5 Milos Kleint CLA 2011-02-07 02:30:47 EST
re-closing, this time as won't fix. see my previous comment. reopen if you disagree.
Comment 6 Paul Tatavu CLA 2011-02-07 10:01:41 EST
I don't see any reason for not fixing this issue properly.
Comment 7 Milos Kleint CLA 2011-02-07 10:06:29 EST
vlad, what is properly? I suppose that includes my objections I had to your proposal because without it, the code will still generate wrong projects. Once you dive into this area, the need to check the possible parent pom arises to see what extensions are defined there. 

-> enhancement. the original issue is fixed in the current state
Comment 8 Pascal Rapicault CLA 2011-03-18 17:09:45 EDT
We are not planning more work on this at the moment.
We'll open more specific bugs.
Comment 9 Denis Roy CLA 2021-04-19 13:24:15 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/