이 콘텐츠는 선택한 언어로 제공되지 않습니다.

6.2. Using the tasks in build files


Adding the JBI tasks to build an Ant file

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 6.5.

Example 6.5. 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>
...
Copy to Clipboard Toggle word wrap
The build file fragment in Example 6.5 does the following:
1
Sets a property, fuseesb.install_dir, the installation directory for Red Hat JBoss Fuse
2
Loads the tasks using the ant/servicemix_ant_taskdef.properties
3
Sets the classpath to make all of the required jars from the Red Hat JBoss Fuse installation available

Installing a component

The Ant task used to install a JBI component is jbi-install-component. Its attributes are listed in Table 6.8.
Expand
Table 6.8. Attributes for installing a JBI component using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
file yesSpecifies the name of the installer file for the component
Example 6.6 shows an Ant target that installs the drools component.

Example 6.6. Ant target that installs a JBI component

...
<target name="installDrools" description="Installs the drools engine.">
  <jbi-install-component port="1099" 
                         file="servicemix-drools-3.3.0.6-fuse-installer.zip" />
</target>
...
Copy to Clipboard Toggle word wrap

Removing a component

The Ant task used to remove a JBI component is jbi-uninstall-component. Its attributes are listed in Table 6.9.
Expand
Table 6.9. Attributes for removing a JBI component using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
name yesSpecifies the component's name
Example 6.7 shows an Ant target that removes the drools component.

Example 6.7. Ant target that removes a JBI component

...
<target name="removeDrools" description="Removes the drools engine.">
  <jbi-uninstall-component port="1099" 
                           name="servicemix-drools" />
</target>
...
Copy to Clipboard Toggle word wrap

Starting a component

The Ant task used to start a JBI component is jbi-start-component. Its attributes are listed in Table 6.10.
Expand
Table 6.10. Attributes for starting a JBI component using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099.
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
name yesSpecifies the component's name
Example 6.8 shows an Ant target that starts the drools component.

Example 6.8. Ant target that starts a JBI component

...
<target name="startDrools" description="Starts the drools engine.">
  <jbi-start-component port="1099" name="servicemix-drools" />
</target>
...
Copy to Clipboard Toggle word wrap

Stopping a component

The Ant task used to stop a JBI component is jbi-start-component. Its attributes are listed in Table 6.11.
Expand
Table 6.11. Attributes for stopping a JBI component using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
name yesSpecifies the component's name
Example 6.9 shows an Ant target that stops the drools component.

Example 6.9. Ant target that stops a JBI component

...
<target name="stopDrools" description="Stops the drools engine.">
  <jbi-stop-component port="1099" name="servicemix-drools" />
</target>
...
Copy to Clipboard Toggle word wrap

Shutting down a component

The Ant task used to shut down a JBI component is jbi-shut-down-component. Its attributes are listed in Table 6.12.
Expand
Table 6.12. Attributes for shutting down a JBI component using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
name yesSpecifies the component's name
Example 6.10 shows an Ant target that shuts down the drools component.

Example 6.10. Ant target that shuts down a JBI component

...
<target name="shutdownDrools" description="Stops the drools engine.">
  <jbi-shut-down-component port="1099" name="servicemix-drools" />
</target>
...
Copy to Clipboard Toggle word wrap

Installing a shared library

The Ant task used to install a shared library is jbi-install-shared-library. Its attributes are listed in Table 6.13.
Expand
Table 6.13. Attributes for installing a shared library using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
file yesSpecifies the name of the installer file for the library

Removing a shared library

The Ant task used to remove a shared library is jbi-uninstall-shared-library. Its attributes are listed in Table 6.14.
Expand
Table 6.14. Attributes for removing a shared library using an Ant task
AttributeRequiredDescription
host noSpecifies the host name where the container is running; the default value is localhost
port noSpecifies the port where the container's RMI registry is listening; the default value is 1099
username noSpecifies the username used to access the management features of the container
password noSpecifies the password used to access the management features of the container
failOnError noSpecifies if an error will cause the entire build to fail
name yesSpecifies the name of the library
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat