Nav

Application Structure Reference

At design time, your Mule application must have at least these three basic components:

Component Type Description

src

Folder

The source directory for your application’s productive source code and tests.
See a reference for this folder below.

pom.xml

Descriptor

The pom file of your Mule application.
This file describes all of your application’s required dependencies.

mule-artifact.json

Descriptor

The mule-artifact file of your Mule application.
This file describes how your Mule application is composed.

These three components are mandatory. If one is missing, the packager tool won’t package your project into a deployable JAR file.
Additionally, the packager tool does not consider any other directory or file in the root folder of your Mule application.

Source Directory Reference

The src directory has two main folders: "main" and "test".
The packager tool does not consider any other directory inside src when packaging the application.

src/main

src/main is the root folder for all the productive source code of the application.

Folder Folder Type Description

src/main/mule

source

Root folder of the Mule configuration files.
It can contain nested folders, in the way of Java packages.

This folder is mandatory.

src/main/resources

resource

It contains the application resources, such as xml, json, and properties files.
Jars file located here are loaded by the application classloader but as plain file resources.

The packager tool sends all files inside src/main/mule and src/main/resources to the root directory of your binary package.
Nested folders within src/main/mule are preserved as directories within the root directory of the binary package.

src/test

src/test is the root folder for all the test source code of the application.

Folder Folder Type Description

src/test/java

source

It’s the root folder of the test classes used to validate the custom Java code of the app.
It follows the conventions of any normal Java application.

src/test/munit

source

It contains the MUnit source code.
It can contain nested folders in the way of packages.

src/test/resources

resource

It contains resources, such as xml, json, and properties files.
This folder also contains files describing metadata being referenced in the mule-config.xml

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+