Separation of Ant and NetBeans
I blogged the other day about the problems I encountered trying to put NetBeans project directories under version control. One problem was that NetBeans uses absolute paths to determine project dependencies and AccuRev, using exlusive locking, makes all files read only. I tried to solve these problems by setting up all project dependencies ahead of time. Apparently, NetBeans needs the ability to modify its project files, regardless of whether it actually modifies those files. So, back to square one.
In the end, the only solution was to completely separate out the Ant build scripts from the NetBeans project folders. This meant recreating build scripts across 7 projects. Fun stuff. Unfortunately, this lost me a day. In the end though the result was a much better project base from which to code and the complete separation of IDE from build script. This means that if developers want to use Eclipse, JEdit, IDEA, JBuilder, or NetBeans to work on the project, they can.
I definitely think this is the better way to go. I am not sure that I feel comfortable dictating what IDE developers should be using. I definitely think that the your build process should be completely independent of the app you use to create your software. This has other benefits as well. We also have build scripts that are now a lot easier to understand and a lot easier to modify and maintain. Yes, a lot of the magic that NetBeans provides is gone, but at least we understand every aspect of the build process and can modify or change any part of it. The NetBeans build scripts have to be among some of the most confusing scripts I have ever seen (although that may not be saying too much).
We also have a process now that is guaranteed to work outside of NetBeans. We can now take our code base and put it under continous integration using CruiseControl without any problems. And if something goes wrong, we can easily and quickly fix the problem.
In the end I agree with the statement that putting the NetBeans project folders under version control is a bad thing. Yes it takes a little longer to get a new developer up and running, but on the other hand the advantages out weigh that one negative.