ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject The <executeon> task
Date Wed, 19 Jul 2000 16:15:10 GMT
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

[executeon] -rw-rw-r--   1 bodewig  bodewig      2478 Jul 19 17:50 /home/bodewig/jakarta/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/defaults.properties
[executeon] -rw-rw-r--   1 bodewig  bodewig        22 Jan 13  2000 /home/bodewig/jakarta/jakarta-ant/src/main/org/apache/tools/ant/defaultManifest.mf
[executeon] -rw-rw-r--   1 bodewig  bodewig        30 Jun 27 12:31 /home/bodewig/jakarta/jakarta-ant/src/main/org/apache/tools/ant/version.txt
[executeon] -rw-rw-r--   1 bodewig  bodewig     15037 Jul 19 14:52 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
[executeon] -rw-rw-r--   1 bodewig  bodewig      3333 Jul 19 14:43 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/AllJUnitTests.java~
[executeon] -rw-rw-r--   1 bodewig  bodewig      3326 Jul 19 14:48 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/AllJUnitTests.java
[executeon] -rw-rw-r--   1 bodewig  bodewig      4730 Jul 19 12:00 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/EnumeratedAttributeTest.java
[executeon] -rw-rw-r--   1 bodewig  bodewig      3200 Jul 19 14:43 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/types/AllJUnitTests.java
[executeon] -rw-rw-r--   1 bodewig  bodewig      4380 Jul 19 14:44 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java
[executeon] -rw-rw-r--   1 bodewig  bodewig      6872 Jul 19 14:47 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/types/CommandlineTest.java
[executeon] -rw-rw-r--   1 bodewig  bodewig      7019 Jul 19 12:00 /home/bodewig/jakarta/jakarta-ant/src/testcases/org/apache/tools/ant/PathTest.java

on my box.

The executable attribute and at least one fileset element are
required.

Stefan

Mime
View raw message