ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jon seymour <...@zeta.org.au>
Subject Re: discussion: build file format
Date Mon, 14 Feb 2000 14:11:52 GMT
One way you could do it is to define a bean for each child element.  The
attributes then become properties of the bean. Then, the name of the child
element is used to identify a property of the task to which the bean is
assigned. You could extend that to any number of levels, if need be...

jon.

rubys@us.ibm.com wrote:

> Kuiper, Arnout writes:
> >
> > > From: jon seymour [mailto:jon@zeta.org.au]
> > > Similarly, if a task has a large number of inputs, it might
> > > be easier if they could be described
> > > by multiple child elements of the task reference, for example:
> > >
> > >       <target name="a.out">
> > >          <depend name="input"/>
> > >          <depend name="output"/>
> > >           <link exe="a.out">
> > >                 <object name="input.o"/>
> > >                 <object name="output.o"/>
> > >            </link>
> > >     </target>
> >
> > I like this, especially with very long classpaths, or includes/excludes,
> > etc. I would say that the child-elements would just be a second way to
> > handle comma-separated lists. In a lot of cases, the build-file would
> > be much easier to maintain.
>
> No question that nested XML elements is something we need to exploit for a
> variety of purposes.
>
> > It can be done rather easily. When parsing a task, scan for
> > child-elements. Join these child-elements, and pass them to the task.
> > The name of the tag should be the same as the attribute. There is one
> > choice left, what name should we use for the attribute of such an
> element?
> > We can also ignore the name and just take the first attribute.
>
> Simple joining and skimming off the first attribute may work in some cases,
> but I don't believe that it is enough in the general case.
>
> Something I would like to see supported:
>
>    <javac srcdir="src" destdir="build">
>      <exclude files="src/com/ibm/bsf/engines/javascript/**"
>               unlessLoadable="org.mozilla.javascript.Wrapper"/>
>    </javac>
>
> Ignore the names of the entity and attributes - alternatives could be
> "include ... onlyIf", and any other suggestions are welcome.  My point is
> that in order to support optional compilation of plugins based on the
> existance of a class in the CLASSPATH, I see the need to process more than
> a single attribute in child attributes.
>
> - Sam Ruby


Mime
View raw message