Reading Time: 3 minutes

Last week at the Mule Summit, I gave a presentation on Mule IDE. One of the questions from the audience was about putting your own examples in the “Sample content” drop down on the “New project” dialog.

This is actually possible today. Here is how you do it:

  • In your Mule distribution, go to the examples directory
  • Create a new folder (e.g., my-custom-example)
  • Put a file named pom.xml into this new directory. Since Mule uses Maven we use this file to get some information about the example. If you don’t use Maven you don’t have to create a full-fledged pom.xml though, this is enough:
    org.mule.examples
    my-custom-example
    My Custom Example
    Whatever you put into the element will later appear as the description of your example project in Mule IDE.
  • Create a subfolder src/main/java in your example project and add any java files you want to include in your example.
  • Create a subfolder src/main/resources in your example project add any resources (properties files etc.) you want to include in your example.
  • Create a subfolder conf in your example project and add any Mule configuration files you want to include in your example project.
latest report
Learn why we are the Leaders in API management and iPaaS

Now launch Mule IDE and point it to the Mule installation that contains your custom example. Create a new Mule project and check the “Add sample project content” checkbox. In the drop down list, you should see your new sample project.

New project dialog with custom example

The project structure is currently tied to Maven’s project layout. If there is interest I can certainly expand this into a more useful feature.