ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Ant2 suggestions
Date Tue, 17 Jul 2001 12:50:41 GMT
On Tue, 17 Jul 2001, Kurt Huwig <kurt@iku-netz.de> wrote:

> Stefan Bodewig wrote:
>> On Mon, 16 Jul 2001, Kurt Huwig <kurt@iku-netz.de> wrote:
> 
>> > What ant lacks compared to make is the dependency based on files,
>> > but later more on this.
>> 
>> Please take a look at the <apply> task.
> 
> I did, but the <apply> currently only executes other programs. I
> would like to have something like execute this Java-class;

This is the <javaon> the requirements list for Ant2 talks about.

> Also, you cannot <apply> another task, right?

<anton> in same document.

> I merely did mean that the fileset stuff can be moved up into the
> Task-class. If a task doesn't need it, it should be no problem.

I'd prefer to reuse the stuff via delegation - which doesn't mean the
current design couldn't be improved.

>> > 2. mappers
>> > -----------
>> > Mappers allow ant to do 'shortcuts' by not applying tasks if the
>> > outfiles are newer then the infiles.
>> 
>> This is not their primary purpose - they are used to define the
>> target files with respect to the source files in the first place.
> 
> I just noticed that they also serve as file-dependecy. If the mapped
> files are newer, the task is never called and therefore cannot
> decide.

This is not the mapper, but the SourceFileScanner class, which those
tasks that need more control (<copy> in the case of the overwrite
attribute) elect to ignore if needed.

>> (2) Ant doesn't guarantee any order - even within a single fileset.
> 
> This should be made clear.

Yes, thanks, volunteer to update the documentation? 8-)

> The sequence of the files is very important for this task.

If it is a custom task, the task could sort the files itself.  The
order of files in a FileSet is the order in which File.list returns
them (searching directories recursively as it goes).

> There is better code in the upcoming 1.4 release where the URL is
> not accessed.

Slow down a little, Ant 2 is just ready to drop JDK 1.1 compatibility 8-)

> So, I can get the current version out of CVS, implement a
> Task-Superclass that supports Collections, port some tasks to it and
> see if it works.

Collections would make it a no-go for Ant 1.x, and there is no design
for Ant2 to work against ATM.

> But this makes no sense if noone agrees on moving the fileset logic
> up.

We already have MatchingTask - actually this is the historic version
of directory based tasks.  <fileset>s have been invented after that,
because they've proven to be more flexible.  A fileset can have only
one "base" directory and there are many situations where a task really
benefits from working on more than just one fileset.

Stefan

Mime
View raw message