I am new to Java-Ant world. I have basic idea about building projects using Ant, but mostly it has been taken care by the IDE used - Netbeans here. The Netbeans generated a build file for my project automatically. Now I would like to have a separate build system where I can download source code from the repository and build it without using Netbeans/IDE. Can anyone suggest how it can be handled - having distinct build system from development system? Also, how is it handled in companies where developers have different kinds of IDE platforms, as IDEs seem to include some IDE specific properties in the build file? Are IDE generated build files ignored by the build system and instead a separate build file is used? I am a student and don't have much idea how things work in multi-developer environment with different types of developer tools.
I got burned really badly on stuff like that, which is why these days I always make sure that my apps don't require an IDE to build.
I make my build files manually, so I haven't run into anything like that recently, but if I did, I'd consider switching to an IDE with a less proprietary view of things.
Actually, I do most builds using Maven these days, and part of the reason is that Maven doesn't require a lot of config stuff as long as you put things where Maven wants them put. Eclipse has a Maven plugin that facilitates editing of the Maven POM, but it doesn't distort the shape of the POM, so I'm OK with that.
An IDE is no substitute for an Intelligent Developer.
Joined: Feb 17, 2011
Thanks for the reply Tim. I am guessing it might be easier if developers exclude build.xml from checking into repository. Not sure how build systems are actually implemented in big development shops though.
Actually, if you're designed build.xml properly, it should be checked into the repository.
A properly-designed build.xml not only runs independent of the IDE(s) that have been used to maintain the project, it also is going to be independent of who's using it. Shop standards are good for this, but so are lots and lots of properties suitable for overriding when someone has a non-standard (or different standard) machine setup.
Believe me, getting a project dumped in your lap with no idea of how to build it is one of the worst things that can be done to you!
John Todd wrote:build.xml file generated by NetBeans isn't NetBeans-independent?
I don't know. Last time I worked with NetBeans, it was still named "Forte". However, if NetBeans is generating IDE_dependent build.xml files, that would be step backwards in IDE technology. Eclipse and IntelliJ can work with a common build.xml.