Creating a Mule project in Eclipse

user1985027 picture user1985027 · Jan 17, 2013 · Viewed 8.2k times · Source

I have started working with Mule. I am working with Mule Studio. This looks good. But when I want to create a Mule project in Eclipse I am struck. Please suggest me how I can create a Mule project in Eclipse.

Answer

user1760178 picture user1760178 · Jan 18, 2013

Option 1: With Mule IDE Plugin for Eclipse.

You can use the Mule IDE plugin from eclipse. This helps in creating the mule project in eclipse.

To add plugins please start eclipse and navigate to help->install new software -> Add site and select the artifacts presented

Add muleide (mule plugin) - http://dist.muleforge.org/mule-ide/updates/3.4/

Then restart Eclipse after the plugin installation and You can create a Mule Project under the New Project option.

Option 2: Without Mule IDE. With Maven and Eclipse.

Open Command prompt. Run the following Maven command to create a Mule project.

mvn org.mule.tools:mule-project-archetype:3.3.0:create -DartifactId=MySampleMuleProj -DmuleVersion=3.3.0

Then run the follwoing commands.

mvn clean compile
mvn eclipse:clean eclipse:eclipse

After this open Eclipse IDE Import this project into the eclipse workspace.

Note: Use Import "Existing Maven Project" option for importing this project.

To run the Mule project in eclipse forllow the below steps.

1. Goto Run -> Run Configurations in eclipse and select Java Application.
2. Click on New launch configuration and enter name of the configuration(for ex. MyMuleProj).
3. Select MyMuleProj as a project and Main class "org.mule.MuleServer".
4. Click on Arguments tab and enter Program arguments "-config src/main/app/mule-config.xml".

You can see the Mule project up and Running.

:) Happy Learning.