---
schema_version: "1"
id: bfa594d5ad641e590ed3f6d10e8051364d7d6c1c6f9174ef229507f7ead2f49b
title: Exporting Mule Projects
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-code-builder/int-export-mule-project.md
canonical_url: https://docs.mulesoft.com/anypoint-code-builder/int-export-mule-project
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 6c4a03eaa735e24a931c5e9bf372f7d08eb9f56031b4af999dccb21e1f616d3b
description: MuleSoft Documentation Site
latest: true
---
---
product: Anypoint Code Builder
version: master
---

# Exporting Mule Projects

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

A Mule application is an integration or implementation application that runs on Mule runtime engine.
To share the application across different teams, or to deploy the application elsewhere, you can
export and package a snapshot of Mule application resources. Additionally, you can publish a Mule
project to Exchange as either a template or an example.

## Shareable JAR

A shareable JAR file is lightweight, packaging only the source code of the application. The source
code includes configuration files but not libraries or other dependencies required for your
application to run and deploy successfully.

The shareable JAR includes:

- The configuration XML and other files in the `src` folder, including resource files

- `mule-artifact.json`

- `pom.xml`

Anypoint Code Builder generates the dependencies automatically based on the settings in the POM file
(`pom.xml`). You or your teammates can import the JAR file and continue developing in Anypoint Code
Builder or Anypoint Studio (Studio).

To import a shareable JAR, see
[Import a Shareable Project JAR File into Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/int-import-mule-project#desktop-project-package).

## Deployable JAR

A deployable JAR file contains the compiled code and all dependencies. For a deployable JAR, you can
select **Include project sources** while exporting the project so the JAR can be opened in Anypoint
Code Builder or Studio and also used for deployment. When this option is selected, the JAR also
includes the configuration XML and other files in the `src` folder (including resource files),
`mule-artifact.json`, and `pom.xml`, the same project sources as in a shareable JAR.

You can deploy the JAR file to any supported environment, such as CloudHub or on-premises. You don’t
need to create a deployable JAR file to deploy to CloudHub. \* To deploy an app directly from
Anypoint Code Builder, see [Deploying Mule Apps to CloudHub and CloudHub 2.0](https://docs.mulesoft.com/anypoint-code-builder/int-deploy-mule-apps).
\* To deploy a JAR file to CloudHub, see [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub).

For more information on deployment options, see
[Runtime Plane Hosting Options](https://docs.mulesoft.com/hosting-home/#runtime-plane-hosting-options.adoc) and
[Deploy Mule Applications](https://docs.mulesoft.com/mule-runtime/latest/deploying).

Because Anypoint Code Builder projects are standard Maven projects, you don’t have to export a JAR
manually every time. A CI/CD pipeline can build and package the same project by running
`mvn clean package` against the `pom.xml` file, then deploy the resulting JAR with the Mule Maven
Plugin or Anypoint CLI, independent of the IDE.

## Before You Begin

- [Set up and access Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/start-acb).

- [Create an integration](https://docs.mulesoft.com/anypoint-code-builder/int-create-integrations).

## Export Mule Project

To create a deployable or shareable JAR file from your project:

1.  Open the configuration XML file in a project for the Mule application to export.

2.  Open the Command Palette.

    Show me how

    - Use the keyboard shortcuts:

      - Mac: Cmd+Shift+p

      - Windows: Ctrl+Shift+p

    - Select **View** > **Command Palette**.

3.  Select the following command:

    ```command
    MuleSoft: Export Mule Project
    ```

4.  Alternatively, right-click the configuration XML file in the Explorer and select **Export Mule
    Project**.

5.  In the Export Mule Project dialog, under **Select an Export Type**, choose one of the following:

    - **Deployable JAR** — Package the project for deployment to Mule runtime. You can select
      **Include Project Sources** to also include the configuration XML files, resource files,
      `mule-artifact.json`, and `pom.xml` in the JAR, making it possible to open the JAR in Anypoint
      Code Builder or Studio.

    - **Shareable JAR** — Package a lightweight version of the project for sharing. This option
      includes only the project source files, not compiled code or dependencies.

6.  In **File Name**, enter a name for the exported file.

7.  In **File Location**, enter or select the directory where you want to save the JAR file.

8.  Click **Export**.

9.  The terminal window opens automatically to provide the status of the packaging process, which
    includes execution of the export command, a scan for the project to export, and the packaging of
    the project snapshot into a JAR file.

### Find or download the JAR

When packaging completes, find the JAR file by following the prompts that appear:

- Click **Open Folder** to open the directory that contains the JAR file in the Explorer view.

The terminal window also provides the path to the JAR, in the `/target` directory under your project
folder. You can find the JAR file in the Explorer, under Java Projects:

![Deployable JAR file in the Java Projects folder](/mulesoft/current/en-us/anypoint-code-builder/_images/int-export-deployable.png)

## Publish a Mule Project to Exchange

You can publish a project as either a template or an example.

A _project template_ is a pre-configured, reusable project setup that serves as a starting point for
developing Mule applications. These templates provide a structured framework that includes common
configurations, example code, and best practices.

A _project example_ is a sample application that demonstrates specific functionalities or use cases.
These examples provide practical, real-world scenarios to help developers implement various features
and integrations.

To publish a Mule project to Exchange as either a template or an example:

1.  In Anypoint Code Builder, on the Explorer view, right-click on your root XML file, for example,
    `/src/main/mule/flights-implementation.xml`.

2.  Select **Publish Mule Project to Exchange** from the options menu.

3.  In the **Publish to Exchange** form, select an **Asset Type**.

    Select either an **Example** or a **Template**.

4.  Ensure that the following fields contain the correct values for your asset:

    ![Form for publishing a project to Exchange](/mulesoft/current/en-us/anypoint-code-builder/_images/publish-project-to-exchange-dialog.png)

    <table><colgroup><col> <col></colgroup><thead><tr><th>Field Name</th><th>Field Value</th></tr></thead><tbody><tr><td><div><div><p><strong>Asset Name</strong></p></div></div></td><td><div><div><p>Name that Exchange uses to identify the published project.</p></div></div></td></tr><tr><td><div><div><p><strong>Version</strong></p></div></div></td><td><div><div><p>Version number to display in the <strong>Version</strong> section of the page that Exchange creates for the asset.</p></div><div><p>Use semantic versioning (<code>major.minor.patch</code>), for example <code>1.0.0</code> for a first-time publish. Increase the major version for breaking changes, the minor version for backward-compatible new features, and the patch version for fixes, so consumers of your asset can decide when to adopt a new version based on the type of change.</p></div><div><p>If you are republishing the asset, Anypoint Code Builder automatically populates the <strong>Version</strong> field. You can change this number, but the republish fails if you use a version number that has already been used to publish a stable version of this asset.</p></div></div></td></tr><tr><td><div><div><p><strong>Description</strong></p></div></div></td><td><div><div><p>Optional description of your asset.</p></div></div></td></tr><tr><td><div><div><p><strong>Business Group</strong></p></div></div></td><td><div><div><p>Business unit in Anypoint Platform that the asset belongs to.</p></div></div></td></tr><tr><td><div><div><p><strong>Group ID</strong></p></div></div></td><td><div><div><p>ID of the business unit in Anypoint Platform that the asset belongs to.</p></div></div></td></tr><tr><td><div><div><p><strong>Artifact ID</strong></p></div></div></td><td><div><div><p>Unique ID that Exchange uses to identify the published asset. Use the default value unless a published asset has the same ID.</p></div></div></td></tr></tbody></table>

5.  In **Advanced Options**, make sure that these fields contain the correct values for your asset:

    ![Form for publishing a project to Exchange](/mulesoft/current/en-us/anypoint-code-builder/_images/publish-project-to-exchange-advanced-dialog.png)

    <table><colgroup><col> <col></colgroup><thead><tr><th>Field Name</th><th>Field Value</th></tr></thead><tbody><tr><td><div><div><p><strong>Tags</strong></p></div></div></td><td><div><div><p>Descriptors that Exchange uses to search for assets.</p></div></div></td></tr><tr><td><div><div><p><strong>Categories</strong></p></div></div></td><td><div><div><p>Category that was previously added to Exchange. Refer to the <a href="https://docs.mulesoft.com/exchange/to-manage-categories">Managing Categories</a> documentation to learn how to create Categories for your organization.</p></div></div></td></tr></tbody></table>

6.  In **Advanced Options**, select the **Keep your local and published project in sync** checkbox
    to sync your local project information with the data you entered. If deselected, your project
    deploys with the provided data, but your local project doesn’t include the updated information.

7.  Click **Publish**.

The publication of your project as a new asset begins. After publication succeeds, select **View
Asset** to view the asset in Exchange.

## Publish Reusable Logic as a Dependency

To prevent building the same logic across multiple projects, such as a common error handler, a
logging framework, or a set of utility flows, package that logic as a Mule project and publish it to
Exchange. Other projects can then add it as a [Maven dependency](https://docs.mulesoft.com/anypoint-code-builder/acb-external-libraries) instead of
duplicating the flows.

## See Also

- [Importing Projects into Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/int-import-mule-project)

- [Package a Mule Application](https://docs.mulesoft.com/mule-runtime/latest/package-a-mule-application)

- [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub)

- [Deploying Mule Apps to CloudHub and CloudHub 2.0](https://docs.mulesoft.com/anypoint-code-builder/int-deploy-mule-apps)
