Interesting Essay from Paul Graham
I recommend reading
Paul's essay. I agree that meetings can waste a lot of time, blogging can be more effective than traditional marketing, people can do incredible amounts of work if they really like the job, more work is done at home than in the office (although working most of the time at home doesn't work IMO because of communication issues - good luck with that Paul) and being on time in the morning is not important for software people. The last part of the essay gets a bit utopistic, but the rest is a very interesting reading.
Hacking NetBeans #5 - Boundling a Library with Your Module
Unless you're doing something very standard there is a probability you'll need to include an additional library with your module. At first it's a good idea to take a look if the library is not included with the IDE (in module/ext subdirs of individual clusters). In that case you can just declare dependence on the module which boundles the library and you're done.
However you probably won't be so lucky and you'll need to provide the library yourself. As I was told it's better to provide your library as a single module - this way others can then depend on this module if they need the library. Some useful info about this is
here. There is a new wizard in NetBeans Plug-in Modules | Library Wrapper Module Project which can do most of the job for you if you want to create a library wrapper module.
The other possibility is to add the library directly into your module which has an advantage that you provide single a nbm with everything. Create a subdirectory e.g. external and place the jar into it. It's a good idea to change the name of the jar, e.g. from mail.jar into mail-1.3.2.jar so that other people can find out what's its version easily.
In order to get the jar copied into your nbm, you need to add something like this to your build.xml:
<target name="netbeans-extra" depends="init">
<mkdir dir="${cluster}/modules/ext"/>
<copy todir="${cluster}/modules/ext">
<fileset dir="external">
<include name="mail-1.3.2.jar"/>
</fileset>
</copy>
</target>
This way you create a modules/ext subdir in your nbm and copy necessary libraries into it. You may need to get the library on classpath, so that it's visible for other modules. The classpath extensions are specified in project.xml like this:
<class-path-extension>
<runtime-relative-path>ext/mail-1.3.2.jar</runtime-relative-path>
<binary-origin>external/mail-1.3.2.jar</binary-origin>
</class-path-extension>
To add more jars to classpath just use additional class-path-extension tags. You get the same effect if you add the Class-Path: property into your manifest, but this method is deprecated - use project.xml for this purpose.
You will also need the IDE to recognize the jar, so that you can use code completion, methods called from the library don't get underlined as errors, etc. This is done by adding a property into the project.properties file:
cp.extra=\
external/library1.jar:\
external/library2.jar
Similar properties are used for tests - test.unit.cp.extra and test.qa-functional.cp.extra, so if the IDE doesn't recognize the API provided by the library, you're probably missing them.
Note that there are special requirements on libraries hosted on www.netbeans.org,
this document explains what needs to be done. The document explains everything necessary about scrambling and unscrambling, how to add a license to the nbm and few other legal topics (legal stuff is boring but you need to be correct).
I've been fighting quite a lot with adding a library to ant's classpath, this is a larger topic so it will deserve another post. Btw, if there's any area about module development you find fuzzy or underdocumented, let me know, I like finding out how things work. I can't guarantee that I will understand everything perfectly, but just writing about how things work for me might help other people out.