Access Keys:
Skip to content (Access Key - 0)
community header community tab mule tab ibeans tab muleforge tab

Mule IDE 2.0 User Guide

This page describes how to use Mule IDE. If you have not already downloaded, installed, and configured Mule IDE, see Mule IDE 2.0 Installation Guide.

Creating a New Mule Project

The Mule Project wizard creates a new Java project configured with libraries from your Mule distribution. The wizard also allows you to copy project source files from several of the examples in the Mule distribution into a new project.

To create a new Mule project:

  1. Choose File > New > Project, expand the Mule folder and select Mule Project, and then click Next.
  2. Enter a name for the project, ensuring that there is no space in the project name. If you want to put the project in a location other than the default workspace, clear the Use default location check box and specify a new file location.
  3. Do one of the following:
    • To use the default Mule distribution you configured, leave Use default Mule distribution selected.
    • If you want to specify a non-default Mule distribution, select if from the drop-down list.
    • If you want to use a new Mule distribution, click Configure Default..., add it to the Mule Distributions list, and then select it from the list.
  4. If you want your project to include the source and configuration from one of the Mule example applications, click Add sample project content and select the example you want to use. Note that not all of the examples that ship with Mule are supported.
  5. Click Next, and then click the Libraries tab and verify that the Java 5 or later library is installed and available on the build path.
  6. Click Finish to have the Mule IDE generate your project.


The project is added to the Package Explorer pane. The Mule libraries from the distribution you selected are contained in the project. If you selected an example, the source and configuration from that example are also in the project.

Creating a New Mule Configuration File

Mule IDE makes it very easy to create a new Mule configuration file.

To create a new Mule configuration file:

  1. Choose File > New > Other, expand the Mule folder and select Mule Configuration, and then click Next.
  2. Click Browse..., expand the project in which you're creating the file, select the conf directory, and then click OK.
  3. Change the default name from mule-config.xml to a unique name in the File Name box.
    Make sure you use a unique name. If you specify the name of an existing file, the new file you are creating will overwrite the existing file.
  4. Select each of the Mule modules or transports you want to include in your configuration. Mule IDE will prepopulate the namespace declarations based on your selections. Note that the Mule core namespace will be populated by default and does not need to be selected. If you want to include a custom or third-party transport or module, see below.
  5. Click Finish.

Mule IDE creates the configuration file in the conf directory of the project you selected. The namespaces are populated based on the transports and modules you selected and the distribution version of your project.


Adding a Third-party Transport or Module

If you want to include a custom module or transport or one from MuleForge, Mule IDE can pick it up automatically, display it in the list of available modules or transports, and include its namespace(s) in the configuration file. For example, you could download a transport from the MuleForge and make it available to the Mule IDE. To make a JAR available, take the following steps:

  1. Ensure that the JAR file includes a Spring-based schema file.
  2. Ensure that the JAR file uses the naming convention mule-*.jar, such as mule-transport-mytransport.jar.
  3. Copy the JAR file to the \lib\user sub-directory under the Mule home directory.

When you restart Eclipse or switch Mule distributions, the transport or module will be available in the configuration wizard.

Testing the Application

Mule IDE allows you to run a Mule server using a specific configuration file, making it easy to test and debug your application. If you have multiple configuration files, you must create a run configuration manually. If you have only one configuration file, the run configuration can be created automatically.

To create a new run configuration manually:

  1. Choose Run > Run Configurations in Eclipse Ganymede or Run > Open Run Dialog in Eclipse Europa.
  2. Click Local Mule Server, and then click New.
  3. Enter a name for the configuration you're creating.
  4. Specify the project that contains the Mule configuration files you want to test.
  5. Click Add and select one or more Mule configuration files in the project.
  6. If you want to use a different Mule distribution for the configuration, select Use a project specific Mule distribution and select the distribution to use.
  7. Click the Arguments tab, and then enter any additional arguments or properties you need to pass to the JVM using -D<Property Name>=<Property Value> just as you would if you were passing parameters in at the command line.
  8. Click Apply.


You can now click Run to launch the Mule server and test this configuration immediately, or run this configuration at a later time.

To create a run configuration automatically:

  1. In the Package Explorer, right-click the configuration file.
  2. Choose Run As > Mule Server.


If a launch configuration exists that contains the selected Mule configuration file, it is used to launch a Mule server. Otherwise, a new run configuration is created automatically and the server is started. If multiple run configurations already exist that contain the selected Mule configuration file, you are prompted to choose which one to use.

If your application requires multiple configuration files, you must create the run configuration manually.

Debugging the Application

To debug your application, you set breakpoints as you would normally in Eclipse and follow the same steps as described in Testing the Applications with the exception that you choose Debug As... instead of Run As.... Note that Mule IDE does not automatically associate the Mule source code with your project, only the libraries from the selected distribution.

Browsing the Mule Source Code

When working with the Mule IDE, the Mule source code is automatically attached to the Mule JARs. This allows you to browse and step into the source code while you're developing Mule applications. The Mule IDE looks for files with the naming convention mule-*-src.zip in $MULE_HOME\src and automatically attaches them to the Mule JARs.

If you're evaluating Mule Enterprise, the source code is not included with the Mule download. To attach the source, simply download the Mule community source code ZIP file into the src directory under your Mule home directory and restart Eclipse.

If you are already a Mule Enterprise customer, you can download the community or enterprise source code ZIP file from the Downloads page on the customer portal. The enterprise souce code has additional classes not available in the community source and is available to Mule Enterprise customers only.

Package and Deploy the JAR and Configuration File

After you have finished creating your Mule application, you can deploy it by packaging up the application in a JAR file and then copying the JAR and configuration file to your Mule instance(s). Eclipse makes it very easy to create the JAR.

  1. In Eclipse, right-click the project and choose Export.
  2. Expand the Java folder, select JAR file, and then click Next.
  3. Make sure Export generated class files and resources is selected and the other options are deselected.
  4. Specify a location and name for the JAR file, and then click Finish. Eclipse creates the JAR file.
  5. Copy the JAR file to the lib\user directory under your Mule home directory.
  6. Copy the configuration file to the conf directory under your Mule home directory.

To deploy your application to additional Mule instances, you can repeat the last two steps for each instance, or you can use Mule Galaxy to update your JAR and configuration files across your Mule instances.

Switching Mule Distributions

It is possible to switch your distribution of Mule for an existing project. Select the Mule Libraries entry in your project and choose File > Properties. In the next dialog, you can switch between the Mule installations you have configured.

If you want to use a new version of Mule, we recommend that instead of switching the Mule distribution for your existing project, you should create a new project using the new Mule distribution. If you have created custom modules or transports, you must copy them from the previous Mule distribution to the \lib\user or \lib\mule sub-directory in the new distribution. Likewise, you should carefully read the migration page for the new version and follow the instructions for migrating your configuration and Java files as needed for the new version, including specifying the new schema version number in the namespace declarations if you are upgrading to a new major point release (e.g., 2.1 to 2.2).

Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license