You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Felciano, Ramon" <fe...@ingenuity.com> on 2000/09/08 04:04:50 UTC

Autoconf-like features in Ant (or elsewhere)?

Hi --

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
Ant. 

- Checking versions of installed software (JDK, Apache, MySQL, etc.)
- 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.)
- Checking basic hardware attributes (file system privileges, free disk
space, etc.)
- Checking JARs in classpath
- Updating properties files based on certain install-time checked values

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.

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?

Thanks for your time!

Ramon

_________________________________

Ramon M. Felciano
INGENUITY Systems, Inc.



Re: Autoconf-like features in Ant (or elsewhere)?

Posted by Barrie Treloar <Ba...@camtech.com.au>.
On Thu, 7 Sep 2000, Felciano, Ramon wrote:

> Hi --
> 
> 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
> Ant. 
> 
> - Checking versions of installed software (JDK, Apache, MySQL, etc.)
> - 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.)
> - Checking basic hardware attributes (file system privileges, free disk
> space, etc.)
> - Checking JARs in classpath
> - Updating properties files based on certain install-time checked values
> 
> 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.

I would say these issues are installation problems and not build
problems.

The reason that they exist in other tools is because of the non-java
nature and they often need to modify source in order to compile on the
target machine.

With java most of these issues become a configuration issue after
deployment on the target machine and by writing your code to be
customizable at deploy time most of these issues disappear.

A decent installation program should handle the rest of the issues.

Barrie
--
Barrie Treloar
____________________________________________________________________

  Barrie Treloar                      Phone: +61 8 8303 3300
  Senior Analyst/Programmer           Fax:   +61 8 8303 4403 
  Electronic Commerce Division        Email: barrie@camtech.com.au
  Camtech (SA) Pty Ltd                http://www.camtech.com.au
 --- Level 8, 10 Pulteney Street, Adelaide SA 5000, Australia. ---
____________________________________________________________________



Re: Autoconf-like features in Ant (or elsewhere)?

Posted by Peter Donald <do...@mad.scientist.com>.
Hi,

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
>Ant. 

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 :<




Cheers,

Pete

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