My current team has standardized NetBeans for our entire Java development, and we use the ANT files created in NetBeans as our official build process.
But the files are always wrong.
Different team members use different versions of NetBeans, and obviously they all generate slightly different build-impl.xml files. Thus, when launched, the NetBeans IDE will regenerate which of these files it solves is incorrect or outdated.
But then (since these files are checked in the source control, like our official build scripts), the build files are usually not synchronized with the repository. If I check the automatically generated changes from my machine, other suckers on my team will have to rewrite their own local copy of the build scripts, as a result of which NetBeans will complain that the files are outdated and need to be regenerated.
This is mainly an annoyance. Either false differences in automatically generated build scripts add a lot of noise to sift every time a developer performs a test. Or the IDE constantly complains about external build scripts. You cannot win.
But I also have a constant grunting feeling that no one has a completely correct build script, and we introduce indeterminism into the entire build process.
As far as I can tell, there are two possible solutions to the problem:
1) Standardize a specific version of NetBeans. Do not let people update until we make a decision, as a team, to do this. And don't let people fall back on older versions. If everyone on the team uses the same version of NB, these problems will (probably) disappear.
2) Do not check the "build-impl.xml" script in the source control. It is automatically generated by the IDE and therefore is an artifact of the "build.xml" and "project.xml" files. Generated files (for example, .class files) should not be checked in the original control, but must be restored during the build process. Find out which mechanism NetBeans uses to create the build-impl.xml file and runs the same mechanism on our build server. Does this mean that our build server will have to rely on NetBeans GUI? I hope no.
What do you guys think? What is the right way to solve this problem?
svn build-process netbeans ant
benjismith
source share