ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: just not getting it
Date Sun, 10 Aug 2003 21:01:41 GMT

----- Original Message -----
From: "Gregory Seidman" <>
To: "Ant users mailing list" <>
Sent: Sunday, August 10, 2003 10:44 PM
Subject: just not getting it

> I'm trying to understand the basic concept of Ant, and I'm just not
> it. Until I understand how to get Ant to compile a bunch of Java source
> files and pack them all into a jar file with the correct main class in its
> META-INF, it won't help me to understand how to add external tasks. I
> even understand the meaning of task.

Don't worry.
A task is an action, like compiling java source code (<javac/>) or building
a jar file (<jar/>) or defining a property (<property/>)
Tasks are implemented in ant as Java classes, and they are used by build
file writers when they put the corresponding xml tags such as <jar/> or

To find out how to compile a bunch of java source code and pack them into a
jar file, you can :

- have a look at examples : for instance, if you download ant's source
distribution, in the root directory there is the file "build.xml" which is
used to compile ant and to run the Junit tests on it. In ant's own line
manual (part of each distribution, and also visible under there are examples of the use of each tasks.
In the document titled "using ant" , there is also a sample
build file which you can use.

- to find out how to make your jar file have a start class, have a look at
the documentation of the jar task and/or of the manifest task.



> I'm sure that part of the problem is that I am looking at this through
> make-colored glasses. I've been using make for a decade or more, and
> created a pretty serious build system with it (for a graduate project and,
> later, a project at work). I've been working with Java since 1995. I'm not
> a newbie to software development, and I've read throug the ant FAQ and
> manual, yet some crucial concept is eluding me.
> Would someone please explain how to handle the simple example of a
> directory/package tree full of .java source files to be built into a JAR?
> Once I have that toehold, I think I can start learning the rest.
> --Greg
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message