Friday, August 1, 2008

Netbeans-Apache Commons library importer

2012 Update: You should be using Maven or Ivy these days. I don't even have copies of the original script anymore, sorry!

I threw together a script to download the latest version of all the Apache Commons components, and create the library files used for Netbeans. It's a little rough and short on docs, but easy enough to use. Some components can't be downloaded and processed easily (those with -e) and the signature of betwixt can't be verified because it's key is out of date, so we force it's acceptance (-f)

cd ~
mkdir JavaLibraries
wget -qO - | gpg --import
./ --sig --dir JavaLibraries/Commons \
-e daemon \
-e httpclient \
-e jci \
-e latka \
-e attributes \
-f betwixt

When you're done, you'll want to copy the xml files from JavaLibraries/Commons/Libraries/
to ~/.netbeans/6.1/config/org-netbeans-api-project-libraries/Libraries/
Replace the bold part with the appropriate version.

It's pretty smart. It'll check to see that you have the current version and only update if you don't.

I like Netbeans' library feature, but keeping up to date on things sucks. If you don't care about docs, Ivy would suffice, but I do want instant javadoc access. That's why I'm using an IDE!

Anywho, it's public domain, feel free to send me enhancements or bugfixes.

No comments: