Petals ANT Tasks 2.4.0+

Introduction

Petals ESB provides support for managing the system using the scripting language Apache Ant 1.5 (or newer). This section details the mapping of the management functions provided through JMX management beans to Ant tasks.
Ant scripts are written using XML. Each task is defined syntactically as named XML attributes and XML elements. Each task defines an element; nested elements are contained within the task element.
Writers of Ant scripts should promote portability of such scripts by supplying necessary Ant task parameters explicitly, rather than depend on implementation-specific default values. Parameterization of scripts, using Ant properties, is a good practice.
This documentation is a part of the JBI specifications.

Contributors
No contributors found for: authors on selected page(s)

General

Error Suppression

All Petals ESB Ant tasks include an optional attribute, “failOnError”, which defaults to true. If this attribute’s
value is false, the task will never fail even if an error occurs during the Ant task execution.

Petals ESB Ant tasks

Task jbi-install-component

This task installs a JBI component (a service engine or binding component) into a Petals ESB container. The installation process provided by this task load and install the component. This task takes optional installation configuration parameters as name/value pairs for setting the attributes of the InstallerConfigurationMBean during the installation. The task takes the configuration parameters as
optional nested <param> elements, or using an optional params attribute if the parameters are in a file.

Attribute Description Default Required ?
host Target Petals ESB container. localhost No
port JMX Remote port on the target server. 7700 No
username User name for security. "" No
password Password for security. "" No
file Fully qualified installation file path name. The file contains a component installation package.   Yes
failOnError Signal task failure to Ant. true No
params Location of a text file (e.g. configuration.properties) that contains name/value pairs corresponding to the properties of the configuration MBean.   No

Nested element <param>

This nested element is an optional child element containing an installation configuration parameter which will be passed to the install task. Multiple parameters require multiple <param> elements, one per parameter. This element takes a name/value pair for setting the property of the InstallerConfigurationMBean implemented by the installer of the component.
Note that the attribute name value is case sensitive. For example, if the configuration MBean has a attribute Foo as a “setFoo” not as a “setfoo”, then the name attribute value for the param element must be “Foo”. Passing the name attribute value as “foo” will result in a property not found error.

Attribute Description Default Required ?
name Name of the property on the InstallerConfigurationMBean. Note that the attribute name is case sensitive. For example, if the ConfigurationMBean has a attribute Foo as a “setFoo” not as a “setfoo”, then the name attribute for the param element should be “Foo”. Passing the name attribute as “foo” will result in a property not found error.   Yes
value Value of the property to be set.   Yes

Attribute params

This attribute is optional, indicating the location of a file containing installation configuration parameters which will be passed to the install task. This attribute specifies the location of a file that contains a set of name/value pairs corresponding to the attributes of the InstallerConfigurationMBean implemented by the Bootstrap implementation of the component. The Ant task read the indicated file as a java.util.Properties file, and use each named property to set equivalent attributes of the installer extension MBean.
If the jbi-install-component element contains a <param> child element, as well as a params attribute, the Ant task combine the two parameter lists, giving precedence to those defined in the properties file indicated by the params attribute. This precedence rule allows tools to generate properties files that can customize standard Ant scripts for performing installation of components.

Example

This example uses script-supplied parameters to provide the configuration data:

<!-- install component -->
<jbi-install-component host = "localhost" port="7890" file = "${my.dev.dir.path}/bpel-engine.zip" />
   <param name="Foo1" value="bar1" />
   <param name="Foo2" value="bar2" />
</jbi-install-component>

Alternatively, an external file can be used to supply the configuration data:

<!-- install component -->
<jbi-install-component file="dir/component.zip" params="dir/params.properties" port="555"/>
where the contents of the dir/params.properties file are:
Foo1=bar1
Foo2=bar2

Task jbi-uninstall-component

This task uninstalls a previously installed JBI component (service engine or binding) from the Petals ESB container.

Attribute Description Default Required ?
host Target Petals ESB container. localhost No
port JMX Remote port on the target server. 7700 No
username User name for security. "" No
password Password for security. "" No
name Name of the JBI component in the Petals ESB container. This is the unique name specified in the component’s installation descriptor.   Yes
failOnError Signal task failure to Ant. true No

Task jbi-install-shared-library

This task installs a shared library into a Petals ESB container.

Attribute Description Default Required ?
host Target Petals ESB container. localhost No
port JMX Remote port on the target server. 7700 No
username User name for security. "" No
password Password for security. "" No
file Shared library installation file path/name. This file is a shared-library installation package.   Yes
failOnError Signal task failure to Ant. true No

Task jbi-uninstall-shared-library

This task uninstalls a previously installed share library from a JBI environment.

Attribute Description Default Required ?
host Target Petals ESB container. localhost No
port JMX Remote port on the target server. 7700 No
username User name for security. "" No
password Password for security. "" No
name Name of the shared library in the Petals ESB container.   Yes
failOnError Signal task failure to Ant. true No
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.