ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Nowostawski <>
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Date Tue, 27 Jun 2000 09:09:17 GMT

could you elaborate how functionality of Exec being a Matching Task can be
achieved without Exec being a Matching Task? I mean 'how you can see it'..

Is such functionality necessary? I believe so. In my personal case, from
"real life" I can give you straight away three examples, in all of those I
use modified Exec which appends all matching files as last argument to the
exec'ed executable call, as parameters of the call:

1. compiling set of .idl files to .java sources via call to appropriate
   jidl compiler (it happens it is binary executable)
2. compiling a set of .grammar files to .java sources i.e. generating
   parsers for several grammar files, via call to appropriate parser
3. processing set of .java files into other .java files (for example
   autoformatting of the source) via call to appropriate formatter (for
   example for preparing the source to be formatted according to the same 
   formatting style for source distribution - in CVS different people work
   on different modules and have slightly different formatting taste)

I am planning to use it also for autogenerating @version in all my
source files for the source distribution jar, etc.  I really think
including each file being processed in seperate <exec> line in my build
file is not an option. 
All tools I use for all those examples work fine with list of files as
arguments. I am aware it might be not always the case, but in such case
somewhere, somebody has to make all the individual calls,
which I would be happy to do inside Exec itself as well (via some switch
in the Exec task itself).   In fact, some of those tools are Java based,
but I have been using Exec instead as I was too lazy to patch Java task
itself, which in fact I would like to see as Matching Task itself as well 
By saying all the above I do not claim Exec and Java _should_ be Matching
Tasks, all I am saying is that in ANT there is a need for such
functionality, and there should be a way to achive it, either via Java and
Exec being Matching Tasks or any other way.  Proposals?

What about Chmod being matching task?  Others?

> >  MN> What about Exec being a Matching Task?
> > 
> > It's on my TODO list - I'm going to start a new thread on this though
> > as I don't really like the idea to make Exec a MatchingTask.
> > 
> > Stefan
> I would not appreciate this neither. Are you planning to redo Exec?

View raw message