Automated deployment with Mule Management Console and Maven

In my opinion a deployment of any application should be as automated as possible to avoid errors due to manual mistakes. This is no different with a Mule ESB application. If you are using the Enterprise Edition of the Mule ESB you also have the ability to make use of the Mule Management Console (MMC). This instrument makes the governance of the deployment of your Mule applications into different environments easier and therefore the whole deployment cycle less error-prone.
One item that I am missing in the MMC is to automatically add a new version of your Mule Application into the MMC. You can upload your Mule applications manually with MuleStudio (which enforces you to use MuleStudio of which I am not a big fan) or by uploading it by using the MMC itself being also manually.
Luckily there is one escape for this which is the REST API that is available for the MMC. Combined with a Maven plugin you can have your Mule application uploaded to the MMC and deployed automatically. Although Mulesoft doesn’t supply this plugin themselves I found an open source version here. I used this as my starting point and added a few enhancements that are useful (at least in my situation). The sources can be found here.
The situation I added is the following:
In case I upload a ‘SNAPSHOT’ version of an application, the existing application is removed from the MMC repository and the new SNAPSHOT version is added. In case of a non-snapshot version only a new version is allowed, an error message is received otherwise. Deployments that are already using the SNAPSHOT version will be redeployed with the new version. As a rule a SNAPSHOT version should only be deployed to the Test environment and never make it to Acceptance or Production.
When you have added the plugin to your Maven repository you can use it in your Mule project by adding the following configuration to your pom:


In my parent pom I have defined the property ‘muleApiUrl’ as:


The ServerGroup ‘Test’ refers to my Test Server in the MMC:
So every time I run ‘mvn install’ the Mule application is added to the repository of MMC and deployed to the Test environment. From the MMC it can then be promoted to Acceptance or Production.

About Pascal Alma

Pascal is a senior IT consultant and has been working in IT since 1997. He is monitoring the latest development in new technologies (Mobile, Cloud, Big Data) closely and particularly interested in Java open source tool stacks, cloud related technologies like AWS and mobile development like building iOS apps with Swift. Specialties: Java/JEE/Spring Amazon AWS API/REST Big Data Continuous Delivery Swift/iOS
This entry was posted in Maven, Mule and tagged , , , . Bookmark the permalink.

2 Responses to Automated deployment with Mule Management Console and Maven

  1. krizsan says:

    Thanks! I have been thinking about using the REST interface of the MMC for a while but haven’t quite found the time.

  2. Pingback: Bookmarks #2 | Adao Feliz - Software Craftsman - Blog

Comments are closed.