LibraryLink ToToggle FramesPrintFeedback

Using the Tasks in Build Files

Before you can use the JBI tasks in an Ant build file, you must add the tasks using a taskdef element as shown in Example 5.6.

Example 5.6. Adding the JBI Tasks to an Ant Build File

...
<property name="fuseesb.install_dir" value="/home/fuse_esb"/> 1

<taskdef file="${fuseesb.install_dir}/ant/servicemix_ant_taskdef.properties"> 2
  <classpath id="fuseesb.classpath"> 3
    <fileset dir="${fuseesb.install_dir}">
       <include name="*.jar"/>
     </fileset>
     <fileset dir="${fuseesb.install_dir}/lib">
        <include name="*.jar"/>
      </fileset>
  </classpath>
</taskdef>
...

The build file fragment in Example 5.6 does the following:

1

Sets a property, fuseesb.install_dir, the FUSE ESB's installation directory.

2

Loads the tasks using the ant/servicemix_ant_taskdef.properties.

3

Sets the classpath so that all of the required jars from the FUSE ESB installation are available.

The Ant task used to install a JBI component is jbi-install-component. Its attributes are listed in Table 5.8.


Example 5.7 shows an Ant target that installs the drools component.


The Ant task used to remove a JBI component is jbi-uninstall-component. Its attributes are listed in Table 5.9.


Example 5.8 shows an Ant target that removes the drools component.


The Ant task used to start a JBI component is jbi-start-component. Its attributes are listed in Table 5.10.


Example 5.9 shows an Ant target that starts the drools component.


The Ant task used to stop a JBI component is jbi-start-component. Its attributes are listed in Table 5.11.


Example 5.10 shows an Ant target that stops the drools component.


The Ant task used to shut down a JBI component is jbi-shut-down-component. Its attributes are listed in Table 5.12.


Example 5.11 shows an Ant target that shuts down the drools component.


The Ant task used to install a shared library is jbi-install-shared-library. Its attributes are listed in Table 5.13.


The Ant task used to remove a shared library is jbi-uninstall-shared-library. Its attributes are listed in Table 5.14.