Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Deploy a Specific Mule Configuration File

DZone 's Guide to

How to Deploy a Specific Mule Configuration File

Let's see how we can deploy a specific Mule configuration file.

· Integration Zone ·
Free Resource

Computer

Mule configuration file

Problem

How do we deploy a specific Mule configuration file on the Mule server [3.8.4]?

In the below project structure, there are three Mule configuration files — a. xml, b.xml, and c.xml — under the src/main/app. So our requirement is to deploy only a specific configuration file on the Mule server runtime for testing purposes or debugging purposes. In this scenario, we want to deploy only the a.xml and b.xml files. How can we achieve this?

You might also like:  Securing Configuration Properties in MuleSoft

Project Structure

Solution

Mule applications can contain various Mule configuration files, so when we deploy it on the Mule server, it picks all the configuration files mentioned against the key config.resources from the (src/main/app/mule-deploy.properties ).

Mule-deploy.properties

First Thought

Let's try deleting all of the specific XML configuration files and keep only the specific configuration file that is required. But then we see the mule-deploy.properties had again added all the configuration files when we deployed. 

Final Solution

1) Delete the configuration files from the mule-deploy.properties against the key config.resources and       keep only the required configuration file (i.e Removed the c.xml configuration file)

2) Right-click on mule-deploy.properties

3) Go to properties

4) Check the read-only option

5) Click Apply and then OK

Changing properties

So when we deploy again, we see only a.xml and b.xml will be deployed.

We can verify this from the output console, as shown below.

Image title

Thanks for reading!

Further Reading

Property File Handling in Mule 4

Configuring Properties in Mule 4 vs Mule 3

Topics:
mule ,mulesoft api ,mule 3.8 ,mule application tutorial ,tutorial ,integration ,mule configuration files

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}