---
schema_version: "1"
id: 7c46f203a7512eea016d99d9712b11b873740ba6e612d30655a09f465485073d
title: Packaging a Custom Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-gateway/policies-custom-package.md
canonical_url: https://docs.mulesoft.com/mule-gateway/policies-custom-package
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3962c1671766fca87514ea9ff80aa51b0f4c61d303d62747d79ef44e05f18509
description: MuleSoft Documentation Site
latest: true
---
---
product: Mule Gateway
---

# Packaging a Custom Policy

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

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

    ```console
    <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 package phase:

    ```console
    > mvn clean package
    ```

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.

## See Also

- [Getting started with custom policies development](https://docs.mulesoft.com/mule-gateway/policies-custom-getting-started)

- [Uploading a Custom Policy to Exchange](https://docs.mulesoft.com/mule-gateway/policies-custom-upload-to-exchange)

- [Reviewing Custom Policy concepts](https://docs.mulesoft.com/mule-gateway/policies-custom-mule-4-reference)
