ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@seessle.de>
Subject Redirecting output of one (or more) tasks?
Date Sat, 23 Sep 2000 14:42:31 GMT
Hi,

I have two tasks (one compiles, the other run's the junit-tests). These
tasks are inside a target which is called several times using antcall to
build several sub-projects.

I want to catch the output of javac and junit and send a mail containing
these files.

This is what I'm currently doing:

1. Modified antcall to accept the output-attribute
2. Put both tasks in their own targets and call each of these targets with
output specifying a different file (Output would be overwritten otherwise)
3. Send an email using these two files.

This is what I would like to do (and I have already implemented it that it
would work):

<tasklog output="task.log">
    <javac .../>
    <junit .../>
</tasklog>

Now the "real" question:

To use something like the above a task must be able to accept other tasks as
a nested element.

Two solutions came to my mind:

1. I write a task which accepts Javac and JUnit as nested elements
2. It would be possible to create a task that accepts *any* other task as a
nested element

Solution 1 would be simple and you don't need to tell me how to do it, but I
wanted to know what others are thinking about solution 2.

I could only think of the following argument against it:

It opens ant to things we don't want to have (for example
     <conditional if="...">
         <task1/>
         <task2/>
     </conditional> )

So what do you think?

Nico



Mime
View raw message