It should be easy, right? I mean, everyone knows that NetBeans projects are based on Ant scripts...
Well, you still have to be careful with some details to make your Ant script usable outside of NetBeans:
- Make sure you use at least Ant 1.6.5. You can look inside nbproject/project.xml to see exactly what is the minimum version needed.
- Make sure your Java Platform (under "Libraries") is set to the default. Otherwise it simply won't find the needed platform properties another machine. The typical way this works is that the platform name is taken from nbproject/project.properties, and the user settings containing paths (to java, javac, etc.) are taken by the file path in user.properties.file in nbproject/private/private.properties, which normally is not distributed.
- On standalone projects, having the dist directory build with the lib directory and README.txt works only within NetBeans. If you need proper packaging, write it yourself in the -post-jar target in build.xml, it's safer that way.
Oh, and sorry about this lack of postings in the past few months. I had no vacation since May, and you know what happens when it's all work and no fun...
I now have interesting things to write so I'll post later this week.
Published on September 12, 2006 at 16:00 EDT
Older post: Debugging Hell
Newer post: "Hardcore Java" tools