ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Autoconf-like features in Ant (or elsewhere)?
Date Fri, 08 Sep 2000 03:22:26 GMT

What you ask for there is already a limited version of - it is just
relatively hard to do and somewhat restricted. Have a look at <available
.../> task and if/unless attributes of targets.

At 07:04  7/9/00 -0700, you wrote:
>I realize this is probably beyond the scope of Ant, but I'm wondering
>whether there are any plans for configuration testing features to go into

I would like to see them but only via custom tasks. Unfortunately it really
has to wait till Ant is converted to immediate interpretation of build file
which should be in next release (that is a few months away). I tried to
partially set it up but as variable expansion is done at parse time it made
it very difficult.

>- Checking versions of installed software (JDK, Apache, MySQL, etc.)

<available will do this for jdk versions but you would have to write own
tasks for other software

>- Checking versions of installed schemas (MySQL, LDAP, etc.)
>- Checking settings in other config files (httpd.conf, etc.)
>- Checking access controls (Web or DB login privileges, etc.)
>- Updating properties files based on certain install-time checked values

a custom task would do those

>- Checking basic hardware attributes (file system privileges, free disk
>space, etc.)

can already do a limited amount of this but have to abide by java rules and
for many you would have to write a custom task

>- Checking JARs in classpath

sorta possible now - if you know name of class in jar or know potential
location of jar. The only problem is that unless/if will only use one
variable during test so there is no way to check for A and B except by
chaining targets which is really really painful (trust me I did this :P).

>This is not traditionally in the realm of build-tools. However, it seems
>like many of the existing configuration tools (autoconf, metaconf) focus a
>fair amount of energy in reconfiguring source code files based on
>configuration-specific settings in order to build a particular piece of
>software that will run in that configuration. Much of that is taken care of
>for us by using Java in the first place, so I thought some of the remaining
>tasks (as outlined above) could be rolled into Ant or a similar tool.

it would be good. I am waiting for either next version of Ant or Ant to
allow 1.2 specific code at which point I plan to work on some of this
including interfaces for c/c++ compilers/parsers/dependancy checkers etc

>Are there any plans to add features like this to Ant anyway? How do you
>folks deal with these issues today? Are there other tools out there that
>address this need in a Java-savvy way?

There is a few installshield-like toolkits out there in java - not sure
whether  they do it - but most are limited to java access approach. You can
do it partially in ant for a limited subset - but not all at the moment :<



| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |

View raw message