ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Nowostawski <mari...@marni.otago.ac.nz>
Subject Re: The <executeon> task
Date Wed, 19 Jul 2000 22:54:49 GMT
First, big thanks to Thomas and Stefan for good work with this piece of
ANT. It seems to work as it is, however as Stefan said, it need some more
work.

I am sorry if I might be mistaken and cannot catch up with the new model,
but why not to make ExecuteOn a subclass of ExecTask? They seems to share
a lot of common funcionality, and already ExecuteOn contains a lot of
repeated code from ExecTask.  My suggestion is to split long (too long
anyway) execute() method in ExecTask, to at least two methods, one for
argument preprocessing (OS, output, etc) and one for real execution, and
in ExecuteOn overwrite the second one, with possible overwriting of some
argument setters which work for <exec> but not for <executeon>. And not
repeat in ExecuteOn all the same setters and precessing which is shared.

I might prepare it if you think it is the way to go, and if Stefan is busy
with other things - what do you think? (Or if Stefan needs to sleep now
- these time differences!  ;o)




On 19 Jul 2000, Stefan Bodewig wrote:
> is a first step, this is going to get improved.
> 
> The task can do almost anything the exec task can, what it currrently
> not does are:
> 
> (1) change directories
> (2) depend on the os
> (3) redirect the output
> 
> I'm not sure where to put the logic for these cases (and I feel even
> timeout and failonerror need to go somewhere else i.e. inside the
> Execute class) - they will follow as soon as I've settled on that.
> 
> Execute on forces you to use <arg> elements as it doesn't have a
> command attribute. A silly example looks like this
> 
>     <executeon executable="ls">
> 
>       <arg value="-l" />
> 
>       <fileset dir="src/main" defaultexcludes="on">
>         <exclude name="**/*.java" />
>       </fileset>
> 
>       <fileset dir="src/testcases" defaultexcludes="off">
>         <exclude name="**/CVS/*" />
>       </fileset>
> 
>     </executeon>
> 
> which creates
>[...]
> 
> The executable attribute and at least one fileset element are
> required.


Mime
View raw message