Contact Us 1-800-596-4880

Add Custom Modules to Your Project

You can add your custom Mule module to your Mule projects in Anypoint Studio.

These instructions assume that you developed your Mule module using the Mule SDK, and that you followed the proper setup steps.
See the Mule SDK introductory instructions for more details.

You can install custom modules using the Studio UI, or by manually adding them as a Maven dependency in your project’s pom.xml file.

From Studio

To install a local custom module from Studio:

  1. In the menu bar, select the Manage dependencies icon Manage dependencies icon.

  2. Under Mule Project, select Modules:

    The Modules option highlighted in your Mule project
  3. Select the green plus icon (A green plus sign) and select From Maven:

    The from Maven option is highlighted in your Mule project properties window
  4. In the properties window, configure your custom module’s Maven coordinates:

    A Mule project property window showing fields to input artifact definition and advanced settings

    This information is available in your module’s pom.xml file.

From Maven

As you develop Mule modules as Maven projects, you can install them from a local or online Maven repository:

  1. In your Anypoint Studio project, edit the pom.xml file with the groupId, artifactId, and version of your Mule module.
    This information is available in your module’s pom.xml file. For example:

    <parent>
        <groupId>org.mule.extensions</groupId>
        <artifactId>mule-ee-core-modules-parent</artifactId>
        <version>1.1.0-SNAPSHOT</version>
    </parent>
    
    <groupId>com.mulesoft.mule.modules</groupId>
    <artifactId>mule-secure-configuration-property-module</artifactId>
    <packaging>mule-extension</packaging>
    <version>1.0.0-SNAPSHOT</version>
    
    <name>Mule Secure Configuration Property Extension</name>
    <description>Mule extension for loading encrypted properties</description>

    It’s also reflected in the folder structure in which the Mule module is installed ($MAVEN_REPOS_HOME/groupID_path/artifactId/version).

    For the previous example, your Anypoint Studio pom.xml file must add the following dependency:

    <dependency>
    	<groupId>com.mulesoft.mule.modules</groupId>
    	<artifactId>mule-secure-configuration-property-module</artifactId>
    	<version>1.0.0-SNAPSHOT</version>
    	<classifier>mule-plugin</classifier>
    </dependency>

    The <classifier> element is set to mule-plugin. This automatically installs the mule-plugin into your project’s palette.

  2. Save your changes to your Studio project’s pom.xml file.

After Anypoint Studio downloads the new dependency, you’ll see your new Mule module in the Studio palette. In this example, there is a Secure Properties module listed in the Mule Palette view.
There’s also a new Secure Properties Config element available in the Global Elements editor, and the new XML namespace and XML tags are available in the XML configuration file editor.