My current team has standardized on NetBeans for all of our Java development, and we use the NetBeans-generated ANT files as our official build process.
But the files are always wrong.
Various members of the team are using different versions of NetBeans, and evidently, they all generate slightly different "build-impl.xml" files. So, upon IDE startup, NetBeans will regenerate whichever of these files it decides are incorrect or out of date.
But then (since these files are checked into source control, as our official build scripts) the build files are usually out-of-sync with the repository. If I check in the auto-generated changes from my machine, then some other sucker on my team will have to overwrite his own local copy of the build scripts, causing NetBeans to complain that the files are out-of-date and need to be regenerated.
Mostly, this is an annoyance. Either the spurious diffs in auto-generated build scripts add a lot of noise to sift through every time a developer does a checkin. Or the IDE constantly complains about externally-modified build scripts. You can't win.
But I also have a constant nagging feeling that nobody has a fully-correct build script, and we're introducing indeterminism into the whole build process.
As far as I can tell, there are two possible solutions to the problem:
1) Standardize on a particular NetBeans version. Don't allow people to upgrade until we make a decision, as a team, to do so. And don't let people straggle behind on old versions. If everyone on the team uses the same NB version, then these issues will (probably) go away.
2) Don't check the "build-impl.xml" script into source control. It's auto-generated by the IDE and is therefore an artifact of the "build.xml" and "project.xml" files. Generated files (like ".class" files) should not be checked into source control, but should instead be regenerated during the build process. Figure out what mechanism NetBeans uses to generate the "build-impl.xml" file, and execute that same mechanism on our build server. Does this mean that our build server would have to rely on the NetBeans GUI? I hope not.
What do you guys think? What's the right way to solve this problem?
I think you should go for number 1, have all your team mates use the same NetBeans version. At my work we also develop in NetBeans, but we all use the same version, and upgrade at the same time. The past two years I've been using NetBeans, I've experienced that various things changes with every release (less nowadays), from configuration to form files, so I feel its better to minimize potential problems with different versions.
Its also easier to pin-point the source of a bug if everyone shares the same environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With