Like working with Mule? We're looking for superstars to join our amazing team.
Did you know . . . MuleSoft has released Studio GA, a powerful new interface for Mule ESB that can cut your development time by half or more. You can model, debug, and deploy your applications all within the rich, yet flexible Studio environment.
Studio provides two-way (i.e., graphical and code-based) editing, which means that developers no longer have to trade ease-of-use against fine-grained control over their development projects. Any changes you make in one mode appear instantly in the other.
Mule Enterprise and Mule iON developers can fine-tune their applications in the advanced Studio XML editor, then re-deploy them on whichever version of Mule those applications were originally developed.
Studio installation is almost instantaneous, and a pair of tutorials can get you up and running in less than 40 minutes.
This page describes the fastest route for downloading, installing, and running Mule ESB. After following the steps in this topic, you will have configured your development environment, launched Mule ESB 3, and successfully deployed your first Mule ESB application.
For the complete installation instructions, including how to set up additional tools such as Maven, or controlling how Mule is configured at startup, see the Complete Installation Manual.
Prerequisites
You must have one of the following Java Development Kit packages installed on the computer where you install Mule:
Standard Edition 1.6.0_26 (also known as JDK SE 6 Update 26) or more recent
Enterprise Edition 1.6u3 (JDK EE 6 Update 3) or more recent
Use the .zip button for Windows and the .tar.gz button for Linux/UNIX. On Linux/UNIX, if wget ships by default on your distribution, or if you have installed wget, you can also enter the following command in a terminal window to download Mule:
Extract the files from it into the directory you want to use as your Mule home directory.
Do not install Mule in a directory path that contains spaces!
On Linux/UNIX, in a terminal window switch to your installation directory, and enter the following command:
tar -xvzf mule-standalone-3.2.0.tar.gz
If you're upgrading from Mule ESB 2.2, read this: Previous versions of Mule ESB required setting an environment variable called MULE_HOME to run Mule. As of Mule 3.1, the MULE_HOME variable is no longer required. Make sure to remove this setting from your environment before running Mule 3.2. This is also true of a previously set MULE_BASE variable.
Install Eclipse and Mule IDE
To begin developing a Mule application, install the Mule IDE.
If you do not have Eclipse version 3.4 or later, download the latest version of Eclipse from http://www.eclipse.org/downloads/ and install it. MuleSoft recommends the Eclipse Java EE Developers package, but you can also install the Java Developers package.
Start Eclipse, and set up a workspace for your installation of Mule. (Important: Make sure your workspace does not have a space in the directory path or the Mule application you develop will not run.)
For Eclipse version 3.5/3.6/3.7 (Galileo/Helios/Indigo) follow these steps to install Mule IDE:
In the workbench view, click Help > Install New Software.
Click the Add button next to the Work with text box, enter http://dist.muleforge.org/mule-ide/updates-2.1.x/ for the location, and press Enter. The Mule IDE now appears in your list of available software.
Select the Mule IDE check box and click Next. Eclipse will process for a moment. When Eclipse is finished processing, click Next again.
Review the Mule IDE license, select the option to accept the license, and then click Finish.
Click Yes to restart Eclipse.
If you are using Eclipse version 3.4 (Ganymede), read this:
In the workbench view, choose Help > Software Updates.
Expand the list until you see the Mule IDE. Choose Mule IDE and click Install.
Click Next, read and accept the license agreement terms, and click Finish.
Choose to run the installation in the background.
When prompted, restart Eclipse.
Configure the Mule Distribution
To execute Mule properly, you must specify in the IDE the location of your Mule distribution.
In the Eclipse workbench, choose Window > Preferences. (On Mac OS X, choose Eclipse > Preferences.)
Choose Mule, and then click Add.
Specify your Mule home directory. Then click OK.
Select the Mule distribution's check box, click Apply, then click OK.
Create a Mule Application
Choose File > New > Project, expand the Mule folder and select Mule Project, and then click Next.
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.
Click Finish so the Mule IDE will generate your project. The project just created is added to the Package Explorer pane. The Mule libraries from the distribution you selected are contained in the project.
Create a conf directory in your Mule project.
Create a new file in the conf directory called "mule-config.xml."
Add the following configuration to mule-config.xml:
Note that what you have just done is create a Mule application, which is XML-driven. When you create a configuration, you are creating an application.
Run the Application
In the Package Explorer, expand the conf directory, and right-click the mule-config.xml configuration file.
Choose Run As > Mule Server.
A new run configuration is created automatically and the server is started. To trigger the Hello service, connect to http://localhost:8080/hello in your browser. The server should respond back with the text "Hello World."
That's it! You have a complete Mule development environment up and running and have created your first application.
You can now modify the configuration file, or create a new configuration file as described in the Mule IDE User Guide.
If you want to use Maven for a task such as using the Maven archetypes for creating transports and modules, see Setting Up Eclipse for Use with Maven for complete instructions.