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.
How to reproduce: 1) Do "New..." popup menu action on "Projects|Sample Project|Output" node 2) In the Wizard select NewJar node and press Next 3) Select "<user_dir>/samples/out" directory and press Finish 4) ERROR - Exception dialog is shown - see attachment for exceptions
Created attachment 8135 [details] Exceptions
If you cannot create JAR from template then the problem is most probably in Jar packager and not in projects. Moving to Ondra for evaluation.
Created attachment 8139 [details] another exception thrown when creating new jar from template
The behaviour of projects changed, so I have to change jarpackager too. I'll write a custom WizardIterator .
Don't panic, it seems that this problem has to do with change in NewTemplateAction introduced by pnejedly one or two days ago. This action doesn't read the target folder from the wizard supplied by the node where it is invoked. I am not sure whether the problem is in our nodes or in the action. But it's not in jarpackager since it doesn't work for java class templates too. Let me investigate it a bit more.
Anyway, I made the template . It is not very foolproof but at least it is possible to create the jar build target. It's in CVS.
This problem is caused by NewTemplateAction.java, revision 1.66. This action used to display list of templates as a submenu and called TemplateWizard.instantiate(template,targetFolder) method which displayed target chooser panel only when targetFolder was null. If targetFolder was specified it displayed only simple panel allowing to enter the name of new object. Now this action always calls TemplateWizard.instantiate() which always shows the target chooser panel and ignores supplied target folder. This is regression -> P1. Also consider Nodes which return instance of TemplateWizard.Cookie with pre-set templatesFolder and instance of DataFolder from their Node.getCookie methods. I am not sure if such Nodes are correctly implemented (perhaps they should have set the targetFolder on the TemplateWizard instance too), but they used to work. For projects people: I have rolled back changes of 1.66 revision and put original version of NewTemplateAction to openide-patches bundled with projects/ide module. The action works as before. This is temporary solution.
The problem was worked around in projects branch and doesn't cause any harm in trunk -> decreasing priority.
*** Issue 29217 has been marked as a duplicate of this issue. ***
Version changed: 4.0 dev -> S1S 4.2
It should be fixed now on the trunk by the reimplementation of the NTAction. Vito, could you please verify whether the new impl works OK in the projects branch and integrate the new version back to the projects branch?
OK, will do, thanks.
It seems that trunk version of NFT action works fine in new projects. I removed our patch so that new projects will use trunk version again.
Verified
As described in http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the current work on projects prototype has been stopped. Marking issue as CLOSED.