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.
For example if a module depends on Apache Commons Collections: When using "Reload in Target Platform", the jarfile passed to the CLI is the file located in "target/", but in the manifest file of the jar, the dependencies are listed like: X-Class-Path: ext/commons-collections/commons-collections-3.2.1.jar Maven-Class-Path: commons-collections:commons-collections:3.2.1 But the file doesn't exist there, so you get ClassNotFoundException when trying to use classes from that library. Instead, if target/nbm/netbeans/[name]/modules/[modulename].jar is used, then the ext folder with the dependencies are present, and the manifest has this instead: Class-Path: ext/commons-collections/commons-collections-3.2.1.jar Easy way to reproduce: * Create a new maven netbeans application * create a new maven netbeans module * Add commons collections as a dependency to module * Create an action that uses a class from that library for instance: JOptionPane.showMessageDialog(null, new org.apache.commons.collections.bag.HashBag().getClass().toString()); * Start Application * Trigger action -> popup box with "class org.apache.commons.collections.bag.HashBag" * Select "Reload in target platform" * Trigger action -> java.lang.ClassNotFoundException: org.apache.commons.collections.bag.HashBag For Javeleon usage, we are currently patching the binaries in JaveleonModuleReloader to reload from target/nbm/netbeans/[name]/modules/[modulename].jar, but for standard module reloading the problem remains.
Reproduced on Linux.
Created attachment 120507 [details] Test case
core-main #7bc91f25f938
Integrated into 'main-golden', will be available in build *201206080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/7bc91f25f938 User: Jesse Glick <jglick@netbeans.org> Log: #213539: CNFEs for Class-Path extensions after "Reload in Target Platform" for Maven NBM Reload from unpacked NBM structure, rather than naked JAR (primary artifact) which lacks Class-Path.
*** Bug 213272 has been marked as a duplicate of this bug. ***