Ant tasks that package and deploy Mule applicaitons
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
src/main
.classpath
.project
README.md
build.xml

README.md

Ant Tasks for Mule Applications

Ant is a tool for building Java applications, which can be extended by adding custom tasks. These tasks will let you build and deploy Mule applications.

To use these tasks:

  • Add -lib mule-anttasks.jar to your Ant command line, to put the classes that implement the tasks in Ant's classpath.
  • Add <taskdef resource="org/mule/mulePackagingTasks.properties"/> to your Ant build file, to import the task definitions.

mulePackage

Description

Create a Mule application archive.

Parameters

<tr>
    <td valign="top">applicationFile</td>
    <td valign="top">the application file to be created</td>
    <td align="center" valign="top">Yes</td>
</tr>
Attribute Description Required

Parameters specified as nested elements

Element Description
config A FileSet specifying configuration files to be placed at the top level of the application.
lib A FileSet specifying jar files to be placed in the application's lib folder.
classes A FileSet specifying class and resource files to be placed in the application's classes folder.

Examples

<mulePackage applicationFile="${app.file}">
  <config dir="src/app"/>
  <lib dir="target/lib"/>
</mulePackage>

packages the application ${app.file} using the configuration files in the config directory and the jars in the lib directory. In this example, there were no classes or resources outside the jars.

<mulePackage applicationFile="${app.file}">
  <config dir="src/app"/>
  <classes dir="target/classes"/>
  <lib dir="target/lib"/>
</mulePackage>

packages the application ${app.file} using the configuration files in the config directory, the classes and resources in the classes directory, and the jars in the lib directory.

muleDeploy

Description

Deploys a Mule application archive.

Parameters

<tr>
    <td valign="top">applicationFile</td>
    <td valign="top">the application file to deploy</td>
    <td align="center" valign="top">Yes</td>
</tr>

<tr>
    <td valign="top">muleHome</td>
    <td valign="top">the base directory for the Mule installation.</td>
    <td align="center" valign="top">No</td>
</tr>
Attribute Description Required

If muleHome is not specified, the value of the property dir.mule.home is used.

Examples

<muleDeploy applicationFile="${app.file}"/>

deploys the application ${app.file} to the mule installation at

${dir.mule.home}, which can be set either in the Ant build file or on the Ant command line.

<muleDeploy applicationFile="${app.file}" muleHome="/usr/opt/mule"/>

deploys the application ${app.file} to the mule installation at

/usr/opt/mule.

cloudHubDeploy

Description

Deploys a Mule application archive to CloudHub.

Parameters

<tr>
    <td valign="top">applicationFile</td>
    <td valign="top">the application file to deploy</td>
    <td align="center" valign="top">Yes</td>
</tr>

<tr>
    <td valign="top">domain</td>
    <td valign="top">the CloudHub domain of the application.</td>
    <td align="center" valign="top">Yes</td>
</tr>
<tr>
    <td valign="top">username</td>
    <td valign="top">the CloudHub account username.</td>
    <td align="center" valign="top">Yes</td>
</tr>
<tr>
    <td valign="top">password</td>
    <td valign="top">the CloudHub account password.</td>
    <td align="center" valign="top">Yes</td>
</tr>
Attribute Description Required

Examples

<cloudHubDeploy applicationFile="${app.file}" domain="${app.name}"/> username="myUsername" password="myPassword" />

deploys the application ${app.file} to CloudHub