Example 5.1 shows the basic usage statement for the FUSE ESB Ant tasks when used from the command line.
Example 5.1. JBI Ant Task Command Line Usage
ant -f InstallDir/ant/servicemix-ant-tasks.xml [-Doption=value...] task
The task argument is the name of the Ant task you are calling. Each task supports a number of options that are specified
using the -D flag.option=value
The Ant task used to install a component to the FUSE ESB container is install-component. Its options are described in Table 5.1.
Table 5.1. Options for Installing a JBI Component with an Ant Command
Example 5.2 shows an example of using install-component to install the Camel component to a container listening on port 1000.
Example 5.2. Installing a Component Using an Ant Command
>ant -f ant/servicemix-ant-task.xml -Dsm.port=1000 -Dsm.install.file=servicemix-camel-3.3.0.6-fuse-installer.zip install-componentBuildfile: ant\servicemix-ant-task.xml install-component: [echo] install-component [echo] Installing a service engine or binding component. [echo] host=localhost [echo] port=1000 [echo] file=hotdeploy\servicemix-camel-3.3.0.6-fuse-installer.zip BUILD SUCCESSFUL Total time: 7 seconds
The Ant task used to remove a component from the FUSE ESB container is uninstall-component. Its options are described in Table 5.2.
Table 5.2. Options for Removing a JBI Component with an Ant Command
Example 5.3 shows an example of using uninstall-component to remove the drools component from a container listening on port 1000.
Example 5.3. Removing a Component Using an Ant Command
>ant -f ant\servicemix-ant-task.xml -Dsm.port=1000 -Dsm.component.name=servicemix-drools uninstall-componentBuildfile: ant\servicemix-ant-task.xml uninstall-component: [echo] uninstall-component [echo] Uninstalling a Service Engine or Binding Component. [echo] host=localhost [echo] port=1000 [echo] name=servicemix-drools BUILD SUCCESSFUL Total time: 1 second
The Ant task used to start a component is start-component. Its options are described in Table 5.3.
Table 5.3. Options for Starting a JBI Component with an Ant Command
Example 5.4 shows an example of using start-component to start the cxf-se component in a container listening on port 1000.
Example 5.4. Starting a Component Using an Ant Command
>ant -f ant\servicemix-ant-task.xml -Dsm.port=1000 -Dsm.component.name=servicemix-cxf-se start-componentBuildfile: ant\servicemix-ant-task.xml start-component: [echo] start-component [echo] starts a particular component (service engine or binding component) in Servicemix [echo] host=localhost [echo] port=1000 [echo] name=servicemix-cxf-se BUILD SUCCESSFUL Total time: 1 second
The Ant task used to stop a component is stop-component. Its options are described in Table 5.4.
Table 5.4. Options for Stopping a JBI Component with an Ant Command
Example 5.5 shows an example of using stop-component to stop the cxf-se component in a container listening on port 1000.
Example 5.5. Stopping a Component Using an Ant Command
>ant -f ant\servicemix-ant-task.xml -Dsm.port=1000 -Dsm.component.name=servicemix-cxf-se stop-componentBuildfile: ant\servicemix-ant-task.xml stop-component: [echo] stop-component [echo] stops a particular component (service engine or binding component) in Servicemix [echo] host=localhost [echo] port=1000 [echo] name=servicemix-cxf-se BUILD SUCCESSFUL Total time: 1 second
The Ant task used to shutdown a component is shutdown-component. Its options are described in Table 5.5.
Table 5.5. Options for Shutting down a JBI Component with an Ant Command
The Ant task used to install a shared library to the FUSE ESB container is install-shared-library. Its options are described in Table 5.6.
Table 5.6. Options for Installing a Shared Library with an Ant Command
The Ant task used to remove a shared library from the FUSE ESB container is uninstall-shared-library. Its options are described in Table 5.7.
Table 5.7. Options for Removing a Shared Library with an Ant Command