[Image]
             - The External Ant Tool for Remote Method Invocation

 
 

 
 
 
[Image]
 
[Image]
 
[Image]


 
 
 

Howto

Wednesday, November 13, 2002

This document is meant to get someone up and running as quick as possible.  If you feel something needs to be included, please email.

This project is a set of simple extensions to Apache's build tool Ant. Currently, the set consists of a task to spawn a background processes, a task to manage spawned background processes, and a helper task for spawning rmid.

The following is an excerpt from Ant's manual slightly modified:

Adding tasks to your system is simple:

  1. Make sure the class that implements your task is in the classpath when starting Ant.  The easiest way to do this is put eatrmi.jar in the lib directory under your Ant installation. 
  2. Add a <taskdef> element to your project. This actually adds your task to the system.  If you specify the classpath attribute in your <taskdef> element, you must also specify the loaderref attribute.  The value of loaderref is arbitrary (can be anything) but it must me the same across all EATRMI tasks (this allows them to interoperate).
  3. Use your task in the rest of the buildfile.

Example

<?xml version="1.0"?>

<project name="OwnTaskExample" default="main" basedir=".">
  <taskdef name="mytask" classname="com.eatrmi.tools.ant.taskdefs.process.BackgroundExecTask"/>

  <target name="main">
    <mytask executable="myexec" id="myspawnedexec"/>
  </target>
</project>

Another way to add a task (more permanently), is to add the task name and implementing class name to the default.properties file in the org.apache.tools.ant.taskdefs package. Then you can use it as if it were a built-in task.



Printer Friendly Version