ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Typical Usage Question
Date Sat, 24 Feb 2001 00:35:55 GMT
At 04:36  23/2/01 -0500, Spencer A Marks wrote:
>What's better:
>
>-Call ant from a script that sets up the environment for ant (e.g. the
>classpath, other environment variable)

-1 BAD

>-Call Ant directly and let build.xml be responsible for setting
> everything up correctly. (e.g. the classpath)

+1 GOOD

;)

>How do people manage to keep build.xml (and any other wrapper files,
>if that is the recommended way to go) under source code control and
>still have site specific configurations available. 

You can use property task to load in configurations from files. Check out
the build.xml included in ants src and it will have 

  <!--
    Give user a chance to override without editing this file
    (and without typing -D each time he compiles it)
  -->
  <property file=".ant.properties"/>
  <property file="${user.home}/.ant.properties"/>

which allows you to have per-project and per-user proeprties.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message