aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant tutorial" Watch "Ant tutorial" New topic
Author

Ant tutorial

Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Can anyone recommend a basic tutorial on Ant? I have never used a build tool so I would like to see what one can do for me.


Matthew Phillips
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Drat. I saw this topic name from the 'main' page, and thought someone was announcing a tutorial.

Most people give the advice of looking at a bunch of ant build scripts to get the idea, but unfortunately, they are all either too simple, or WAY too complex for a beginner like me.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
That is the problem that I am having. My wife really doesn't want me to buy another book, but I may have to put my foot down (so she can step on it ).
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4991
    
    8

Thomas Paul wrote an article for the newsletter. See his post in MO on Feb 25. It has the link to his article in the temp directory.
Junilu
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Junilu Lacar:
Thomas Paul wrote an article for the newsletter. See his post in MO on Feb 25. It has the link to his article in the temp directory.
Junilu

Of course, until published only bartenders and sheriffs can see it.
Meanwhile, JavaReport had an article in their October 2001 issue and JavaDevelopersJournal had an article in their June 2001 issue.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
If you can wait until May:
http://www.amazon.com/exec/obidos/ASIN/0596001843/
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Junilu Lacar:
Thomas Paul wrote an article for the newsletter. See his post in MO on Feb 25. It has the link to his article in the temp directory.
Junilu


It was published in this month's newsletter!
Sita Kotamraju
Ranch Hand

Joined: Nov 30, 2001
Posts: 60
Some Ant links:
Ant in Anger
Extending Ant to support interactive builds
Incremental Development with Ant and JUnit
Ant User Manual
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
I wrote one, but it is too specific for our co. I need make it more general, then put in my FAQ collection. Unfortunately, I don't have the time for now.
However, I found Log4J project's build.xml is simple enough for beginner to digest, and complete enough to learn a lot of ant.
Just a suggestion.
Need Java real project experience? Join our project team here!
Narasimhan Sethuraman
Greenhorn

Joined: Dec 18, 2001
Posts: 3
You Can download Ant Document from Jakarta site. It is pretty good.
Matt Rasking
Greenhorn

Joined: Feb 12, 2002
Posts: 15
I found this article on O'Reilly's pages quite helpful to understand some of the basic terminology, it also contains some mroe links to example implementations:
http://www.onjava.com/pub/a/onjava/2001/02/22/open_source.html
Val Pecaoco
Ranch Hand

Joined: Dec 05, 2001
Posts: 156
Here's a very good introduction from Builder.com. In case you haven't known yet, Builder.com is a newly-launced site for developers by TechRepublic. Also, don't forget to read the sequel which is currently featured at the home page.
Ex Animo Java!
-- Val


"Knowledge is power, but enthusiasm is the key." -- Lavern Barn
Sjoerd Reitsma
Greenhorn

Joined: Mar 06, 2002
Posts: 5
Ant 101 from a junior programmer:
I downloaded Ant from Jakarta and set the ANT_HOME variable and added ANT_HOME\bin to the path.
Then I started reading the documentation in the manual (\docs\manual\index.html). I took the build.xml example from the section Using Ant in the manual and started playing with it.
When it dawned on me how it worked, I kept adding more and more tasks. I was amazed at the power and speed of Ant.
The build.xml is basically a lists of tasks you CAN do (compile, copy, create a war file, etc.), combined with target directives which specify which tasks you WILL do with a particular target setting.
The first time I used Ant I just used someone else's build.xml and changed some variables. It did the job, but I did not really understand how it worked. The second time I built my own build file, and then I was able to do much more with it, because I had grasped the idea behind it.
Enjoy Ant! It can save you a lot of time.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Here's a link to another ant tutorial. I hope it helps!
http://softwaredev.earthweb.com/sdtech/article/0,,12065_989631,00.html


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Nicholas Lesiecki
Greenhorn

Joined: Mar 12, 2002
Posts: 13
As several people have mentioned, the Ant Documentation is very good.
This week's book giveaway features Java Tools for Extreme Programming, which is all about integrating Ant and other open source tools into real projects.
Also, Manning has a book in production on Ant, authored by Steve Loughran and Erik Hatcher. I've gotten a sneak peek at it, and if you need more information than JTFXP can provide, it should be the definitive reference.
Cheers,
Nicholas Lesiecki


Principal Software Engineer<br />eBlox, Inc.<br />(520) 615-9345 x104<br />Check out my new book!:<br /><a href="http://www.amazon.com/exec/obidos/ASIN/047120708X/" target="_blank" rel="nofollow"><br />Java Tools for Extreme Programming: Mastering Open Source Tools, including Ant, JUnit, and Cactus<br /></a><br /><a href="http://www.rickhightower.com/JavaXPToolkit/" target="_blank" rel="nofollow">More Info</a><br /> <br /><br />Check out my article on <a href="http://www-106.ibm.com/developerworks/java/?loc=dwmain" target="_blank" rel="nofollow">AspectJ.</a>
Tim Voet
Ranch Hand

Joined: Jan 30, 2002
Posts: 30
Thanks for the links everyone,
i started reading the ant documentation 2 weeks ago.....and neede some more source, to confirm that i was actually understanding what was going on...
but i do have another question Nicholas, do you know of any good links for JUnit, and Cactus???
if you know of some, please let me know...
thanks


---<br />Nothing is impossible, only improbable !!!
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
The ant documentation is very good, but it is not a tutorial. I was looking for something more along those lines. I was looking for the "quick fix" for learning ant. I will check out some of the links you have posted. Thanks.
Luis Araujo
Greenhorn

Joined: Aug 27, 2001
Posts: 6
try this:
http://www.ant.harvard.edu/ANT-1.0/ant.ps
Nicholas Lesiecki
Greenhorn

Joined: Mar 12, 2002
Posts: 13
The best place to start with Cactus is:
Cactus Home Page
The best place to start with JUnit:
JUnit.org
Good luck!
Nicholas Lesiecki
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Nicholas Lesiecki:
Also, Manning has a book in production on Ant, authored by Steve Loughran and Erik Hatcher.
O'Reilly has an upcoming book on Ant.
http://www.amazon.com/exec/obidos/ASIN/0596001843
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant tutorial