XML Tools Plugin in NetBeans Plugin Portal
By Geertjan on Oct 12, 2011
I wrote about the XML Schema Editor a while ago (here) and how you can install it in NetBeans IDE 7.x (i.e., any 7, e.g., 7, 7.0.1, 7.1). And then there were questions about simplifying the process, i.e., putting all those NBM files into the NetBeans Plugin Portal.
So, a few days ago I did that. (But then forgot I had done so since it was at the height of my jetlag in San Francisco where I was doing things at 2 AM and then forgetting I'd done them.)
Go to the above page and click the Download button. You'll then have one single module, instead of the dozen or so that you'd normally get, i.e., the XML Tools plugin consists of many individual modules. I have a trick whereby I put all the JARs and related metadata into a single NBM, which is much more convenient for distribution than distributing all the individual NBMs.
You too can do the same thing, if you want to bundle the content of multiple NBMs into a single NBM. It is hacky, be warned, but it works. Create a new NetBeans module in NetBeans IDE. Build the module. Switch to the Files window. Go to "build/cluster". Create a new folder/subfolder there "update/download", i.e., you'll have "build/cluster/update/download". Then put all the NBMs (i.e., in my case, all the modules from the XML Tools plugin) into the "download" folder and then run the module, i.e., right-click the module in the Projects window and run it. Now NetBeans IDE starts up and all the NBMs are 'exploded', i.e., unpacked and their content is put into the correct places within the module's build folder. Then copy all the JARs, from where they've been unpacked, into "build/cluster/module" folder and all the XML files into the "build/cluster/config/Modules" folder. Then create a ZIP file, i.e., externally, on disk, of the content of the "cluster" folder (but excluding the cluster folder itself, i.e., you'll have the folders "config", "modules", and "update_tracking" on the highest level of the ZIP). Then change the extension of the ZIP to NBM. And now you have a new NBM file constructed from the cluster of your build folder, containing all the JARs from the NBMs you included, as well as the related XML files providing the related metadata. When you install that single NBM file, everything else you included, i.e., the JARs, are installed too, since you also have the metadata needed for installing them.