MuleSoft CloudHub2.0: Changes Required for Mule4.6 with Java8/Java17 in CICD

Archana Devi
Another Integration Blog
3 min readMay 17, 2024

Background:

MuleSoft has released Anypoint studio v7.17.0 which is compatible with both Java 8 and Java17.

MuleSoft page link: — Deploy Applications to CloudHub 2.0 Using the Mule Maven Plugin | MuleSoft Documentation

Implementation:

This document explains the changes required in the mule applications and to use Mule 4.6 with Java v8 and Java v17.

A. Mule4.6 with Java v8:

There are some changes required in “Cloudhub2Ddeployment” under Maven plugin section of the POM file of the project. Mule v4.6.2 and Maven plugin (v4.1.0 or earlier) don’t provide option to define a Release Channel and Java version in the POM file. The release version is by default set as “Edge” and Java version is also set as default Java 8.

Even if different values are supplied in the POM file for release channel and java version, they won’t be accepted and they will still be set as “Edge” and Java 8 respectively.

As LTS channel is not supported using a Mule Maven plugin version 4.1.0 or earlier.

Below screenshot shows an example of the POM snippet covering CloudHub2.0 configuration.

Once the development of a new mule application or the changes in existing mule application is completed, and the developer pushes the codes in to the GitLab or any project repository the respective CI/CD pipeline of the project is triggered and which will first build the project, publish the artifacts on Anypoint Exchange and then eventually deploy the build to the CloudHub2.0 runtime manager.

Please refer my another blog to understand GitLab CICD set up for MuleSoft (CloudHub2.0):-
CI/CD setup of MuleSoft (Cloudhub 2.0) using GitLab

Run the pipeline and check the results and logs:

Once the application is deployed on CloudHub2.0, check the runtime manager to verify the application is deployed with updated mule version (4.6.2), Release Channel (with default value as “Edge”) and Java version (with default value as “8”)

B. Mule4.6 with Java v17:

Mule v4.6.3 and Maven (v4.1.1 or later) allows to define the release channel and Java version in the Cloudhub2Deployment under Maven section in the POM file of the project. We can supply “LTS” for release channel (“LTS” for mule 4.6.3 or latest and “Edge” for mule v4.8) and Java version 17 in the POM file as per the screenshot below:

Deploy the Mule Application and check the application in runtime manager. The runtime manager shows the application is deployed with updated mule version (“4.6.3”), Release Channel (“LTS”) and Java version (“17”)

Summary:

This is the way to update deployment configuration for CICD setup of CloudHub2.0 to make mule application compatible with mule version 4.6 with Java 8 or java 17.

Thank you.

--

--