Contact Free trial Login

Packaging a Custom Policy

You can use the Mule Maven Plugin to package your custom policy into a deployable JAR file that you can later apply to an API.

  1. Make sure you added the Mule Maven Plugin to your pom.xml file. This is done automatically by custom policy’s Archetype

    <plugin>
        <groupId>org.mule.tools.maven</groupId>
        <artifactId>mule-maven-plugin</artifactId>
        <version>${mule.maven.plugin.version}</version>
        <extensions>true</extensions>
    </plugin>
  2. From the command line in your project’s folder, run the install phase:

    > mvn clean install

The packager then packages your application and creates the deployable JAR file into the target directory within your project’s folder.

It will also verify that all the necessary files were provided for the packaging, and that the information provided in the mule-artifact and in the policy yaml are valid.

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.