Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338804 - error recovery after failed to-be-imported project analysis
Summary: error recovery after failed to-be-imported project analysis
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Milos Kleint CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 339112
  Show dependency tree
 
Reported: 2011-03-03 08:10 EST by Milos Kleint CLA
Modified: 2021-04-19 13:25 EDT (History)
2 users (show)

See Also:


Attachments
screenshot (66.71 KB, image/png)
2011-03-03 08:10 EST, Milos Kleint CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint CLA 2011-03-03 08:10:36 EST
Created attachment 190257 [details]
screenshot

see screenshot.
after we(I) have added the analysis of projects  into the first panel of the import wizard, the errors in the analysis  are not correctly recovered from. 

I need advice on how to proceed in this case:
do we just allow people to import the project without jumping to the lifecycle page?
Is there some other way for users to recover?
is this error "normal" or something that has to be fixed?
Comment 1 Igor Fedorenko CLA 2011-03-03 09:31:34 EST
Generally, I think we should warn but allow import.

For this specific error, if the project builds from cli please open separate bugreport with steps to reproduce.
Comment 2 Milos Kleint CLA 2011-03-03 09:37:00 EST
the problem shows in our m2e-core sourcebase for example where we have test projects that get scanned along with the "normal" projects.

can we skip and note the failed projects and return a partial LifecycleMappingConfiguration instance from the LifecycleMappingConfiguration.calculate() method? 
The line of thinking is that even if some projects fail to load we want to have the mapping resolved for the rest.
Comment 3 Igor Fedorenko CLA 2011-03-03 13:53:25 EST
M2e codebase does not have aggregator pom.xml in the root, in which case project scanner just looks for all pom.xml files. Import from .parent project works fine. I do not know how much effort we need to put in no-aggregator case, tbh.
Comment 4 Pascal Rapicault CLA 2011-03-03 20:40:08 EST
Despite the particular case where this got encountered (project without aggregator), or things that fail importing (broken pom, what not), we should still handle that gracefully.
Comment 5 Pascal Rapicault CLA 2011-03-03 20:44:06 EST
This has been fixed in 0.13 that is work in progress until mid June when Indigo ship.
In the meantime you can try it from http://download.eclipse.org/technology/updates/M or http://download.eclipse.org/technology/updates/N if you want to be on the bleeding edge.
Comment 6 Pascal Rapicault CLA 2011-03-03 20:44:34 EST
Sorry, wrong bug!
Comment 7 Milos Kleint CLA 2011-03-04 03:08:04 EST
(In reply to comment #3)
> M2e codebase does not have aggregator pom.xml in the root, in which case
> project scanner just looks for all pom.xml files. Import from .parent project
> works fine. I do not know how much effort we need to put in no-aggregator case,
> tbh.

can we change that to look for all pom files but just one level deep? either only look in direct subfolders of the root or look deeper but once a folder with pom.xml is found, we no longer traverse the child directories?
Comment 9 Milos Kleint CLA 2011-03-07 04:06:03 EST
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=57b8a9ffcd0fc70ce893c8d842ecad3297eab3e2

attempts to catch the exception thrown by analysis code and reports it. The downside is that if the exception is thrown, no analysis information is available to the user and the wizard.

a more elaborate solution is to catch the exception inside the analysis codebase and return a list of problems while still collecting the analysis information for the rest of the to-be-imported projects. Then we could mark the failed projects with an icon or similar and still provide reasonable behaviour for the rest of the projects.

Please provide feedback with regard to the current solution (good enough or not) and the ideal case I outlined (to be done this iteration or not). thanks.
Comment 10 Milos Kleint CLA 2011-03-21 10:14:28 EDT
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=11d77c64ab8b97b6d4c664f067c5cd4004986f39

now have the partial analysis result being processed. The projects with failed analysis get to show an error message like the failed scanning does (in the message area above)

I've tried to experiment with selection based errors and marking the failed  projects with icons, but discarded the idea.  Turned out to be too much extra work (given how much lineups ui took time) . maybe next time.

Orthogonally to this effort, the error message need some polishing and simplifying (as usual). The current raw exception messages are not fitting well into the messages area and are also not very informative (too detailed) to the average user. IMHO at least
Comment 11 Denis Roy CLA 2021-04-19 13:25:42 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/