This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In last step of the wizard, the UI is frozend and waiting for background work... I think it is better to close the wizard window firstly and make a schecule for the job to run in backgroud.
Created attachment 102974 [details] screen of the wizard, I waited several munites and the window was closed.
True for any Maven archetype, not specific to NBM development (which the screenshot does not even show!). Not solvable in isolation in the Maven module; this is just what ProgressInstantiatingIterator (platform/dialogs) is documented to do. *Any* project (or file) template keeps the wizard open until complete, though in the case of Maven archetypes it is possible for this to take longer than usual. ("Several minutes" sounds pathological - what precisely was taking so long?) Undesirable to just run the project creation asynch and return an empty set from the instantiate method, as New Project uses the return values for other UI purposes such as selecting the newly created projects. Perhaps there could be a new interface public interface BackgroundInstantiatingIterator<Data> extends AsynchronousInstantiatingIterator<Data> { Set/*<?>*/ instantiate() throws IOException; } whereby WizardDescriptor would close the dialog, permitting the user to continue other work, before calling instantiate. (The implementor would typically choose to show some manner of progress handle, but this could be just the regular handle shown during Maven execution; the infrastructure does not need to know about it, unlike with ProgressInstantiatingIterator.) A small improvement to the existing UI would be to enable the Cancel button in case the progress handle was created with a Cancellable. Probably would require changes in the impl of ProgressHandleFactory.createProgressComponent.
The complex change outlined by Jesse seems to be the only option, but at the same time the user still needs to wait for the project creation to be completed before she can start working with it. And I personally did not encounter times longer than several tens of seconds and most of the time just a few seconds. Closing as wontfix. This is not an issue worth the change, time fixing it, and catching and fixing any regressions the async change would definitely cause.
*** Bug 103457 has been marked as a duplicate of this bug. ***
*** Bug 196162 has been marked as a duplicate of this bug. ***
I understand Tondo but this issue becomes a blocker for users who experience a network outage and can't do anything with the IDE in such situation.
Something we would like to fix, though probably not for 7.0. Possible amelioration which seems pretty safe: if the Maven process has not finished after ten seconds or so, just return an empty set from the iterator. So the wizard will close, but the Output Window will continue to show whatever is happening. If and when the process successfully completes, can open the resulting projects then.
Created attachment 110304 [details] Patch to time out after ten seconds (In reply to comment #7) > Possible amelioration which seems pretty safe: if the Maven process has not > finished after ten seconds or so, just return an empty set from the iterator. This patch seems to work fine for simple archetypes. It would probably not work, however, for wizards which process multiple archetypes (EAR, NBM app), or which perform some postprocessing on the project after creation.
Created attachment 110305 [details] Proposed patch (minus API changes) (In reply to comment #2) > Perhaps there could be a new interface ... > whereby WizardDescriptor would close the dialog, permitting the user to > continue other work, before calling instantiate. The attached patch implements this design and uses it for the wizards based on Maven archetypes. (to refresh: cd core-main && hg pdiff BackgroundInstantiatingIterator_191951)
Please review.
core-main #1b71dee63500
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/1b71dee63500 User: Jesse Glick <jglick@netbeans.org> Log: #191951: introduce BackgroundInstantiatingIterator to perform work after the wizard has been closed.