I’ve recently started working with Mule 4 from years of doing Mule 3 and I’ve had to figure out a number of differences in the Mule 4 POM files with few documented use cases. The biggest change has been how the Mule Maven Plugin works for deployment into the cloud. My previous posts have been about deployment, so I’ll go into a bit on the new mule-maven-plugin.




I’ve highlighted the fieds in the beginning of the <configuration> tag because they are the ones that are new for Mule 4.  One big advantage here is that it could be possible to deploy to Cloudhub.

I set the variables in this in a couple different places.

In a previous post I talked about where to store  config files on Jenkins easily.  I store the fields:


in this config file.

In Jenkins when I run a deploy, using the job parameters I select:


At the time of deployment, or I code these into the job.  It’s typical that you might want to have a different size and number of workers for different environments: dev, stage, or production.

But there’s a bug

At this time there also seems to be a bug that I haven’t correlated to any action I can control.  Every 1 out of 3 or 4 deploys I do will fail with the error “No Application File Found”.  Usually I can run it again and it will succeed.  Unfortunately this error seems to only show up on Anypoint Cloudhub logs and Jenkins seems to not know about it.  So at this time I have to monitor Anypoint deploy logs to make sure it deploys.