Mule Domain Project in Mule ESB is a project that contains common resources between Mule applications, meaning that applications can reuse the Mule Component defined in the Mule Domain Project. In this tutorial, I will guide you how to create a Mule Domain Project in Anypoint Studio.
Go to File, select New and then Mule Domain Project:
In this window, in the Project Name box, enter your project name. By default, the Domain Name field will automatically generate the name of the domain you want to create. You can edit this domain name if you want.
Then, you click Use Maven and edit the information of Maven as Group Id, Artifact Id or Version if you want.
Click the Next button to continue.
Click Next.
Now click Finish to complete creating a Mule Domain Project.
Result:
In the project we just created, you will see it has a file called mule-domain-config.xml with the following content:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?xml version="1.0" encoding="UTF-8"?> <domain:mule-domain xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:domain="http://www.mulesoft.org/schema/mule/domain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/domain http://www.mulesoft.org/schema/mule/domain/current/mule-domain.xsd"> <!-- configure here resource to be shared within the domain --> </domain:mule-domain> |
This is the file that will contain the common resources that we will use in many of these Mule applications.