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

Bug 344647

Summary: Dependency downloading shouldn't block Eclipse
Product: z_Archived Reporter: Daniel Serodio <eclipse.dserodio>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: hanriseldon, igor
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Daniel Serodio CLA 2011-05-03 18:22:52 EDT
When I create a new project using an archetype or import an existing one, and m2e has to download the project's dependencies, the "Creating Maven project" (or "Importing Maven project") task does not finish until it has downloaded all dependencies.

If this download is slow for any reason, Eclipse gets "stuck" running this task, I can't cancel this task and can't even quit Eclipse cleanly, forcing me to kill Eclipse.

This task shouldn't block other tasks, or at least it should be cancellable.
Comment 1 Igor Fedorenko CLA 2011-05-03 20:48:21 EDT
What version of m2e are you using? When you say "block" do you mean that Eclipse UI locked and cannot be used or something else?
Comment 2 Daniel Serodio CLA 2011-05-04 10:20:43 EDT
No, the UI is not frozen but I can't build projects, for example. For example, right now the Progress view has a "Building workspace" task that'e been running for 12+ hours without completing, and a "Refreshing workspace" task that's ``Blocked: the user operation is waiting for "Building workspace" to complete''. 

I tried to clean a project to force it to rebuild, and Eclipse added a "Cleaning selected projects" task which is waiting for the previous two tasks.

I'm using m2e 0.12.1.20110112-1712 with the WTP add-on 0.12.0.20110421
Comment 3 Igor Fedorenko CLA 2011-05-04 11:14:25 EDT
Can you try recent 0.13 build? Long-running dependency resolution is expected to honour cancel requests. If not, we'd need thread dump with un-stoppable jobs to troubleshoot it.

As for making this non-blocking, I don't think it is possible. Project import and build jobs require workspace lock, there is no much m2e can do about it. FWIW, m2e dependency resolution job is non-blocking already but it is only used when workspace autobuild is off.
Comment 4 Igor Fedorenko CLA 2011-08-01 02:40:55 EDT
Please reopen if long running m2e operations do not honour cancel request in 1.0 and attach corresponding JVM thread dump.
Comment 5 Denis Roy CLA 2021-04-19 13:24:48 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/