ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linskey, Patrick" <plins...@techtrader.com>
Subject bootstrapping custom tasks?
Date Wed, 11 Apr 2001 03:52:16 GMT
Hello,

I've successfully written some custom tasks for ant, and am now trying
to figure out how to best design my build process. The compilers that
the custom ant tasks invoke are part of the project, so ant dies a
miserable death if I <taskdef> them before they've been built.

Clearly, I could write a separate build file that must be invoked in
order to bootstrap the system. But I want a single point of entry for
compilations. I'd rather if people didn't have to rememeber to run the
bootstrap compiler first.

I've come up with a workaround whereby all the references to the new
tasks are stored in a separate build file. The primary build.xml
invokes these compilers by invoking an <ant> task on the separate
build file, specifying the compiler to use as a target. The primary
file ensures that all the targets that do this depend on the
compilers, so they get built before the <ant> task is invoked. But
this is really ugly. I'd much rather have a single build file.

Is it possible to indicate to ant that it should not try to load a
taskdef until that taskdef is used? Or is there some other pattern
that people use for this type of bootstrapping situation?

Thanks,

-Patrick

-- 
Patrick Linskey      plinskey@techtrader.com
Software Engineer    phone: 202.349.2577
TechTrader, Inc.     www.techtrader.com

Mime
View raw message