Custom project templates in Mule IDE


Last week at the Mule Summit, I gave a presentation on . 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:
    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.

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.

We'd love to hear your opinion on this post

One Response to “Custom project templates in Mule IDE”

  1. […] project templates, a topic that was described in a previous blog post, will benefit greatly from the new approach described above. One area that is still a bit weak is […]