ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <JFernan...@viquity.com>
Subject RE: templates ...
Date Tue, 11 Jul 2000 18:06:01 GMT
> From: Peter Donald [mailto:donaldp@mad.scientist.com]
> 
> At 05:36  11/7/00 +0400, you wrote:
> 
> yep change the name of the following method in taskdefs/Ant.java
> 
> from "public Task createProperty() {" to "pblic Task 
> createSubproperty() {"
> 
> and change
> > <target name="build_foo_project">
> >   <ant antfile="build_tmpl.xml">
> >     <property name="subproject" value="foo" />
> >     <property name="src" value="foo/src" />
> >     ...
> >   </ant>
> > </target>
> 
> to read
> 
> > <target name="build_foo_project">
> >   <ant antfile="build_tmpl.xml">
> >     <subproperty name="subproject" value="foo" />
> >     <subproperty name="src" value="foo/src" />
> >     ...
> >   </ant>
> > </target>
> 
> or something like that - replacing subproperty with something more
> semantically correct if you can think of anything :P. 
> 

Maybe we should call it "param" which is what it is. (paramproperty is way
to long).

Hummmm... 
With this and by calling ant onto the same ANT file, you may be able 
to actually simulate local templates, interesting...

This may be a thing worth adding as a general facility.

<target .... >
  <ant antfile="${this.ant.file}" dir="${basedir}" target="templ1">
    <param name="a" value="y" />
  </ant>
</target>

<target name="templ1" ... >
  <!-- ${a} is defined during the call, not statically -->
  ...
</target>

Jose Alberto

Mime
View raw message