ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: ANT on Mac OS X
Date Tue, 09 Jul 2002 01:06:00 GMT
--- Scott Ellsworth <scott@alodar.com> wrote:
> Can I load that with a taskdef, or must it go in ant/lib?

You wouldn't <taskdef> it, as it's not a task -- it's a logger. You'd just
specify it as the parameter to the -logger flag on your command line. (You
can set it in the ANT_ARGS var for the nightly-build environment.)
 
> I have a question about the classpath.  Are the ant and optional jars
> in the compiler classpath when things are set up in the out of the box 
> fashion?

If you haven't turned off 'includeAntRuntime' in your <javac> task, yes.

> If I understand things properly, the ant classes are not in 
> the classpath by default,

No, actually, they are by default -- the wrapper script(s) put them in
there. You need to set <javac>'s 'includeantruntime' attribute to
no|off|false to have them not be in the classpath you compile with.

> so if I wish to compile a new logger, or a new task, I have to have
> ant.jar in a known spot on the classpath.

If you're compiling it with Ant, you don't need to worry about it. Here's
my little build file for compiling stuff like that:

<project default="compile">
  <target name="compile">
    <fail unless="file" message="The 'file' property must be set."/>
    <javac
      debug="true"
      srcdir="."
      destdir="."
      includes="${file}">
    </javac>
  </target>
</project>

It lives at the top of my $HOME/src/java tree -- so I'd just do, eg.:
  $ ant -Dfile=my/ant/stuff/NewAntDooHiggee.java[,...]
Assuming all went well, then I just do:
  $ jar cvfM doohiggee.jar my/ant/stuff/NewAntDooHiggee.class
  $ mv doohiggee.jar $ANT_HOME/lib
I suppose I could put all of that in my little build file as well -- just
never got around to doing that.

> Our build system is explicitly not allowed to know the location of the
> build tools, so to compile an ANT task or logger, I have to put a copy
> of ANT jar in our "third party libraries to be compiled against".

Not if you use Ant for your build system.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message