But what if the JAR files are not in the Library Manager? And what if you don't know where they are? I've been told that soon we'll have a new NetBeans API for dealing with libraries in the framework world (and I am looking forward to that, a lot). In the meantime, how to get those JAR files as painlessly as possible? If you look at NBTapestrySupport, by Andreas in Athens, you'll see that he gives you the option of clicking a link in the Frameworks panel, which takes you to the nbtapestrysupport site, where you can get a ZIP file which, when you unzip it, reveals the JAR files, which you must then register in the Library Manager. That's one approach. Another approach is taken by Petr Pisl (in NBFaceletsSupport). I've more or less followed his approach in my WebWork module. In the Frameworks panel, one gets two tabs (just like in Petr's NBFaceletsSupport module). In the second tab, the Libraries tab, one can either select a folder (which must conform to certain criteria, such as a specific name, so that we can be sure that an appropriate folder is selected by the user) on disk or select one of the registered libraries. Petr's approach is restrictive—he only shows libraries that begin with "facelets". My approach is broader—I show all libraries in the Library Manager, as can be seen here:
The user can either select a library from the drop-down or browse to a folder containing the appropriate JAR files. In the latter case, the JARs are added, programmatically, to the Library Manager (in addition to being put on the current application's classpath). This code, in my module, is not 100% complete, but I'm glad that the majority of it works, thanks to Petr's work for Facelets. This is a relatively small but significant step, which will also be useful when I start looking at support for Grails, during the coming week.
I've been thinking of changing exactly that part and doing something similar to what Petr does - perhaps also having netbeans download the zip on its own.