Jump to content

  • Log In with Google      Sign In   
  • Create Account

Another Neat Tool (ANT): It's better than batch files :)

  • You cannot reply to this topic
No replies to this topic

#1   Members   


Posted 31 July 2013 - 11:48 PM

So there I was, just a hackin' and a codin' a mod for Minecraft in Eclipse. And at the end, there's a bunch of stuff to do: Run a couple special external tools, relocate a bunch of files into a new folder tree, and then zip them up, add comments to the zip file, and so on. And I had a pretty cool batch file to do all that. Then someone showed me ANT, and I'm sold.


Ant does all the stuff I was doing, but much more elegantly. The tool uses an xml file, usually called build.xml, and it looks like this:

       <!-- do some stuff -->
      <!-- do some other stuff -->

The build.xml that I made for my Minecraft modding endeavors looks like so:



It can do advanced stuff, like substituting a token string during a copy operation. Within my source files is @VERSION@, but when copied by the build.xml, that string gets replaced.

Edited by AngleWyrm, 31 July 2013 - 11:54 PM.

--"I'm not at home right now, but" = lights on, but no ones home