The moose likes Ant, Maven and Other Build Tools and the fly likes ANT is lame... so limited :( Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "ANT is lame... so limited :(" Watch "ANT is lame... so limited :(" New topic
Author

ANT is lame... so limited :(

Tim Tibbons
Greenhorn

Joined: Mar 23, 2004
Posts: 3
Hey everyone, I use ANT to build stuff and one thing that really bothers me with the whole concept is that it's really not easy to gather information about what file ends up in what JAR etc, or what target compiles what file. For instance, lets say I wanted to develop a home grown contiuous integraion system that as you check-in a source file it builds the appropriate parts of the code. Do do this I would need to know what target compiles the particular file so I can re-run that target. But, ANT does not allow for this type of thing at all!!! Or how about if I wanted to have a dynamic patch generator that knows what portions of the product to build based on changed source files... for instance, I change foo.java and the build system automatically knows that it's needs to re-build the jar bar.jar because it contains foo.java. And of course it knows what target to run that will re-create bar.jar. See... ANT sucks. A build system that maintains these relationships would be way more useful. I looked at continuous integraion products like CruiseControl but they are super lame cause they just do a full build when a file is checked i... which is great unless your builds take 5 hours. So, am I missing something? How do people deal with these issues? Does anyone ever want the ability to programatically determine what files end up where without actually running the ant target? Hmpf....
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Actually, Ant is quite versatile. Extending the Ant tasks is about the easiest thing to do and could quite easily handle what you want it to. You may be new to Ant though: targets are build segments containing various tasks to be completed, one of which is compilation. You seemed to have confused these in your post. My point is that you would know which target you are using to compile your source because you would have defined it.
Regarding your comments on actions taken when only several files have changed, Ant handles all that too. Reading through the tasks portion of the Ant API docs will help you sort out these issues. And if, in the end, something you want Ant to do really doesn't--just create your own tasks or extend Ant's tasks, making it do what you want it to do. (It really is easy!)


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Tim Tibbons
Greenhorn

Joined: Mar 23, 2004
Posts: 3
See... I think you missed the point. I well aware of how to use ANT but it's the architecture that is the problem. Sure, I create all of the targets that 'do stuff' right? Compile, copy, stage, package etc... but lets say I want to map back what file gets put into a particular JAR, how would you do that? The target that creates the JAR is a standard ANT target that, lets say takes all files from \mydirectory\* now how can I take that target and determine what files will get put into that JAR? You really can't ... unless you run the target. And custom ANT tasks... sure I could do that but I would have to re-write all of the basic tasks that already exist, which hardly seems like a good solution. So tell me this, if you had 400 targets and you wanted to gather information from them how would you do that? Sure I can generate XML reports about the structure of the targets, what they do, etc... but it won't give me the real information I want which is a file to JAR map, target to file map, etc. The architecture just does not allow this kind of information to be gathered. So, I think for little small projects ANT is good... but for very large complicated ones it's very limited.
 
IntelliJ Java IDE
 
subject: ANT is lame... so limited :(
 
Threads others viewed
This weeks Giveaway
Can I debug in IDEA using ant to build?
Should i move my builds from ANT to Maven?
name of a jar
Eclipse3.0 removes class files automatically
IntelliJ Java IDE