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.
When wrong location is specified for a jar to be used in a MakeNBM task, users error very misleading error about the manifest.mf file: "Can't get manifest attributes". Example: <target name="nbm" depends="netbeans"> <makenbm file="j2eeserver-deprecated.nbm" topdir="." module="non-existent.jar" </makenbm> </target> While its true that failure to find the jar file (IOException) would prevent access to manifest attributes, its likely to puzzle developers into debugging the manifest.mf file, wasting a lot of time. It will be more useful to print error text from the IOException instead.
Actually the bug appears to be in MakeListOfNBM.java: try { Method m = nbms[i].getClass().getDeclaredMethod("getAttributes",null); m.setAccessible(true); attr = (Attributes)m.invoke(nbms[i],null); } catch (Exception ex) { throw new BuildException( "Can't get manifest attributes", ex, location ); } I hope this horrible code is going to be deleted soon with the layers_36759 merge, but in the meantime probably the penultimate line should read throw new BuildException("Can't get manifest attributes: " + ex, ex, location); I assume the actual problem is shown if you run Ant with -verbose but not otherwise.
As I'm planning to commit layers_36759 at Tuesday March 9 morning GMT so I think I can close this as duplicate to #36759. *** This issue has been marked as a duplicate of 36759 ***