このコンテンツは選択した言語では利用できません。

Chapter 6. Using the JBI Ant Tasks


Important
The Java Business Integration components of Red Hat JBoss Fuse are considered deprecated. You should consider migrating any JBI applications to OSGi.
The JBI specification defines a number of Ant tasks that can be used to manage JBI components. These tasks allow you to install, start, stop, and uninstall components in the Red Hat JBoss Fuse container. You can use the JBI Ant tasks as either command line commands or as part of an Ant build file.

6.1. Using the tasks as commands

Usage

This is the basic usage statement for the Red Hat JBoss Fuse Ant tasks when used from the command line:

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 -Doption=value flag.

Installing a component

The Ant task used to install a component to the Red Hat JBoss Fuse container is install-component. Its options are described in Table 6.1.
Expand
Table 6.1. Options for installing a JBI component with an Ant command
OptionRequiredDescription
sm.username noSpecifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.install.file yesSpecifies the name of the installer file for the component
Example 6.1 shows an example of using install-component to install the Camel component to a container listening on port 1000.

Example 6.1. 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-component
Buildfile: 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
Copy to Clipboard Toggle word wrap

Removing a component

The Ant task used to remove a component from the Red Hat JBoss Fuse container is uninstall-component. Its options are described in Table 6.2.
Expand
Table 6.2. Options for removing a JBI component with an Ant command
OptionRequiredDescription
sm.username noSpecifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.component.name yesSpecifies the name of the JBI component
Example 6.2 shows an example of using uninstall-component to remove the drools component from a container listening on port 1000.

Example 6.2. Removing a component using an Ant command

>ant -f ant\servicemix-ant-task.xml -Dsm.port=1000 -Dsm.component.name=servicemix-drools uninstall-component
Buildfile: 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
Copy to Clipboard Toggle word wrap

Starting a component

The Ant task used to start a component is start-component. Its options are described in Table 6.3.
Expand
Table 6.3. Options for starting a JBI component with an Ant command
OptionRequiredDescription
sm.username  Specifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container.
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.component.name yesSpecifies the name of the JBI component
Example 6.3 shows an example of using start-component to start the cxf-se component in a container listening on port 1000.

Example 6.3. Starting a component using an Ant command

>ant -f ant\servicemix-ant-task.xml -Dsm.port=1000 -Dsm.component.name=servicemix-cxf-se start-component
Buildfile: 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
Copy to Clipboard Toggle word wrap

Stopping a component

The Ant task used to stop a component is stop-component. Its options are described in Table 6.4.
Expand
Table 6.4. Options for stopping a JBI component with an Ant command
OptionRequiredDescription
sm.username noSpecifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.component.name yesSpecifies the name of the JBI component
Example 6.4 shows an example of using stop-component to stop the cxf-se component in a container listening on port 1000.

Example 6.4. Stopping a component using an Ant command

>ant -f ant\servicemix-ant-task.xml -Dsm.port=1000 -Dsm.component.name=servicemix-cxf-se stop-component
                Buildfile: 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
Copy to Clipboard Toggle word wrap

Shutting down a component

The Ant task used to shutdown a component is shutdown-component. Its options are described in Table 6.5.
Expand
Table 6.5. Options for shutting down a JBI component with an Ant command
OptionRequiredDescription
sm.username noSpecifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.component.name yesSpecifies the name of the JBI component

Installing a shared library

The Ant task used to install a shared library to the Red Hat JBoss Fuse container is install-shared-library. Its options are described in Table 6.6.
Expand
Table 6.6. Options for installing a shared library with an Ant command
OptionRequiredDescription
sm.username noSpecifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.install.file yesSpecifies the name of the library's installer file

Removing a shared library

The Ant task used to remove a shared library from the Red Hat JBoss Fuse container is uninstall-shared-library. Its options are described in Table 6.7.
Expand
Table 6.7. Options for removing a shared library with an Ant command
OptionRequiredDescription
sm.username noSpecifies the username used to access the management features of the Red Hat JBoss Fuse container
sm.password noSpecifies the password used to access the management features of the Red Hat JBoss Fuse container
sm.host noSpecifies the host name where the container is running; the default value is localhost
sm.port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
sm.shared.library.name yesSpecifies the name of the shared library
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat