tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin.Manola...@eng.sun.com
Subject Re: Ant
Date Thu, 09 Dec 1999 16:32:19 GMT
> Well, I love automatic things, but not those behind my back. This
> because tomorrow I know I won't remember the syntax of the file
> _automatically_ called (I never do in UNIX shells) and I have to look
> them up every time.

Ok, what about
<propertiesfile name=xxx >
with the behavior:
- load xxx.properties
- load xxx.OS.ARCH.properties
- load ~/.xxx.properties  ?

The ideea is to have a way to use the same build.xml for multiple
platforms - of course, you can also do
<propfile name="xxx${java.os}.${java.arch}" />

About properties name - we should try to have a set of "well-known"
names:

- dist directory
- ftp directory ( or where you put the .ziped package to be pulled out nightly)
- tstamp and dstamp ( for nightly builds ) ( it can be another tag that sets it,
but we should use it consistently)

Also, I am thinking about tags like <apache-home> that will search in well-known
locations for apache and set the apache_home property ( same for other packages
we depend on ).

> Properties are defined in the build.xml file or in external files to
> reduce verbosity and to allow property-dependent operation. I don't
> think we need anything else.

Agree, but some properties have os-dependent value.
Like ftp home.
And some are hard to express in build.xml - like TSTAMP.

> Ok, let's clear things out
>
> <project>
>  <target name="init">
>   <property name="" value=""/>
>   <properties file=""/>
>  </target>
>
>  <target>
>   ...
>  </target>
> </project>
>
> is this right?

Yes.
Also, taskdef will go into init, plus any other task that set properties
( like apache-home or coocon-home )

> > Another aproach would be to load system properties automatically,
> > without an explicit <default-properties>.
>
> I thought system properties were already copied over to Ant? isn't it
> so?

Yes, I was thinking about the extra properties we need for building.


>  <if class="org.apache.xalan.xslt.XSLTProcessor">
>   <task .../>
>  </if>

I like this, but it is very dangerous - people will use ant as a scripting
language, and that's bad.
The logic and conditionals should be in tasks code.

What about having a
<calltarget name="xalan" ifdefined="...." />  ?

Costin


Mime
View raw message