Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/ROOT/pages/_partials/acb-project-migration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Selecting *Attach Project Sources* flags the `-DattachMuleSources` parameter as
// tag::import-mule-project-into-acb[]
Import a shareable JAR file for a snapshot of a Mule project into the desktop IDE.

To create a shareable JAR file, see xref:int-export-mule-project.adoc#shareable[Export to a Shareable JAR File].
To create a shareable JAR, see xref:int-export-mule-project.adoc#export-mule-project[Export Mule Project].
The contents are lightweight because they don't include dependencies.
The IDE generates the dependencies configured in the `pom.xml` for the project.
Comment on lines 33 to 34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is not necessarily true because they can create shareable jar with or without dependancies. As long as the sources are attached, the project can be imported into ACB


Expand Down
141 changes: 46 additions & 95 deletions modules/ROOT/pages/int-export-mule-project.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,134 +9,86 @@ include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"]

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.

* A <<shareable, 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 IDEs generate 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).

* A <<deployable, deployable JAR file>> contains the compiled code and all dependencies.
+
You can deploy the JAR file to any supported environment, such as CloudHub or on-premises.
+
To deploy a JAR file to CloudHub, see
xref:cloudhub::deploying-to-cloudhub.adoc[].
+
You don't need to create a deployable JAR file to deploy to CloudHub.
To deploy an app directly from Anypoint Code Builder, see
xref:int-deploy-mule-apps.adoc[].

* A <<publishable, publishable Mule project template or example>> contains resources to share the project via Anypoint Exchange.
+
You or your teammates can import the Mule project from Exchange and continue developing in Anypoint Code Builder or Studio.

== Before You Begin

* xref:start-acb.adoc[Set up and access the web or desktop IDE].
* xref:int-create-integrations.adoc[Create an integration].


[[shareable]]
== Export to a Shareable JAR File
== Shareable JAR

When you export a Mule project, the shareable JAR file includes these files:
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.
Copy link
Contributor

@mlinsf mlinsf Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 3 export options:

  1. Deployable Jar: Takes the compiled code and package it in its distributable JAR with all its dependencies
  2. Deployable Jar + Attach Project Sources: Package into distributable JAR with source files and metadata needed to reimport the deployable file as an open Mule project.
  3. Sharable Jar: Takes the compiled code and package its source code only.

options 2 and 3 are shareable jars because they include project sources

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option two is explained inside the conceptual section of the deployable Jar (line 30):

"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. "

The == Shareable JAR and == Deployable JAR sections are not reflecting the UI options, rather they contain conceptual info about the differences between the two types of packages. Do you think this needs some adjustment?


The shareable JAR includes:

* The configuration XML and other files in the `src` folder, including resource files
* `mule-artifact.json`
* `pom.xml`

To generate a shareable JAR file:
The IDEs generate 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).

. Open and place your cursor in the configuration XML file in a project for the Mule application to export.
// Pointer to Command Palette
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
. Select the following command:
+
[source,command]
----
MuleSoft: Export Shareable JAR
----
+
This command is equivalent to the command sequence `Task: Run Task` > `mule` > `mule: Package Only Sources`.
+
The terminal window in the IDE 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 file by following the prompts that appear in the IDE after the packaging process completes successfully:
+
** In the desktop IDE, click *Open Folder* to open the directory that contains the JAR file in the Explorer view.
// +
// The file name for the JAR file follows the pattern `_application_name_-_version_-SNAPSHOT-mule-application-light-package.jar`, for example, `my-app-example-1.0.0-SNAPSHOT-mule-application-light-package.jar`.
To import a shareable JAR, see xref:int-import-mule-project.adoc#desktop-project-package[Import a Shareable Project JAR File into the Desktop IDE] and xref:int-import-mule-project.adoc#web-project-package[Import a Shareable Project JAR File into the Cloud IDE].

** In the cloud IDE, click *Download File* to download the JAR file to a directory on your local machine:
+
--
** For a JAR file that is 32 MB or smaller, the IDE automatically downloads the file to your Downloads folder.
** For a JAR file that is larger than 32 MB, the IDE disallows downloads to built-in folders that contain system files, such as the Downloads, Desktop, or Documents folder.
+
... Select a folder for the download.
... At the prompt, click *View files* to allow the site to view the files in the folder you select.
... Click *Save Changes*.
--
// +
// The file name for the downloaded shareable JAR file follows the pattern `_application_name_-_version_-SNAPSHOT-shareable-mule-application.jar`, for example, `my-app-example-1.0.0-SNAPSHOT-shareable-mule-application.jar`.
+
The terminal window in the IDE also provides the path to the JAR, in the `/target` directory under your project folder.
// but good luck finding it!
[[deployable]]
== Deployable JAR

The file name for the downloaded shareable JAR file follows the pattern `_application_name_-_version_-SNAPSHOT-mule-application-light-package.jar`, for example, `my-app-example-1.0.0-SNAPSHOT-mule-application-light-package.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.

To open a shareable JAR file in a project workspace within Anypoint Code Builder, see xref:int-import-mule-project.adoc#desktop-project-package[Import a Shareable Project JAR File into the Desktop IDE] and xref:int-import-mule-project.adoc#web-project-package[Import a Shareable Project JAR File into the Cloud IDE].
// To import to Anypoint Studio, see xref:studio::import-export-packages.adoc[].
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 xref:int-deploy-mule-apps.adoc[].
* To deploy a JAR file to CloudHub, see xref:cloudhub::deploying-to-cloudhub.adoc[].

For more information on deployment options, see xref:hosting-home::index.adoc#runtime-plane-hosting-options.adoc[Runtime Plane Hosting Options] and xref:mule-runtime::deploying.adoc[Deploy Mule Applications].

[[deployable]]
== Export to a Deployable JAR File
== Before You Begin

When you export a Mule project, Anypoint Code Builder packages the compiled code and all dependencies into a distributable JAR.
* xref:start-acb.adoc[Set up and access the web or desktop IDE].
* xref:int-create-integrations.adoc[Create an integration].

Deployment procedures vary by Mule runtime host and deployment mechanism.
For example, you can deploy to CloudHub through the Runtime Manager UI or REST API.
For more information, see xref:hosting-home::index.adoc#runtime-plane-hosting-options.adoc[Runtime Plane Hosting Options] and xref:mule-runtime::deploying.adoc[Deploy Mule Applications].
[[export-mule-project]]
== Export Mule Project

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

. Open and place your cursor in the configuration XML file in a project for the Mule application to export.
// Pointer to Command Palette
. Open the configuration XML file in a project for the Mule application to export.
//. Right-click the configuration XML file in the Explorer and select *Export Mule Project*, or open the Command Palette and select `MuleSoft: Export Mule Project`.
+
include::partial$acb-reusable-steps.adoc[tags="open-command-palette"]
. Select the following command:
. Select the following command:
+
[source,command]
----
MuleSoft: Export Project to Mule Deployable Jar
MuleSoft: Export Mule Project
----
+
This command is equivalent to the command sequence `Task: Run Task` > `mule` > `mule: Package`.
. Alternatively, right-click the configuration XML file in the Explorer and select *Export Mule Project*.
. In the Export Mule Project dialog, under *Select an Export Type* choose *Deployable JAR* or *Shareable JAR*.
+
The terminal window in the IDE opens automatically to provide the status of the packaging process, which includes the 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 file by following the prompts that appear in the IDE after the packaging process completes successfully:
+
** *In the desktop IDE*, click *Open Folder* to open the directory that contains the JAR file in the Explorer view.
// +
// The file name for the JAR file follows the pattern `_application_name_-_version_-SNAPSHOT-mule-application.jar`, for example: `my-app-example-1.0.0-SNAPSHOT-mule-application.jar`.
+
The terminal window in the IDE also provides the path to the JAR, in the `/target` directory under your project folder.
In the Desktop IDE, you can find the JAR file in the Explorer, under Java Projects:
+
image::int-export-deployable.png["Deployable JAR file in the Java Projects folder"]
For *Deployable JAR*, you can select *Include project sources*.
. Set the file name and location for the exported file.
. Click *Export*.
. The terminal window in the IDE 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-download-jar]]
=== Find or download the JAR

* *In the cloud IDE*, click *Download File* to download the JAR file to a directory on your local machine.
When packaging completes, find or download the JAR file by following the prompts that appear in the IDE:

* In the desktop IDE, click *Open Folder* to open the directory that contains the JAR file in the Explorer view.
* In the cloud IDE, click *Download File* to download the JAR file to a directory on your local machine:
+
--
** For a JAR file that is 32 MB or smaller, the IDE automatically downloads the file to your Downloads folder.
** For a JAR file that is 32 MB or smaller, the IDE automatically downloads the file to your Downloads folder.
** For a JAR file that is larger than 32 MB, the IDE disallows downloads to built-in folders that contain system files, such as the Downloads, Desktop, or Documents folder.
+
... Select a folder for the download.
... At the prompt, click *View files* to allow the site to view the files in the folder you select.
... Click *Save Changes*.
--

The file name for the downloaded deployable JAR file follows the pattern `_application_name_-_version_-SNAPSHOT-mule-application.jar`, for example: `my-app-example-1.0.0-SNAPSHOT-mule-application.jar`.
The terminal window in the IDE also provides the path to the JAR, in the `/target` directory under your project folder. In the desktop IDE, you can find the JAR file in the Explorer, under Java Projects:

image::int-export-deployable.png["Deployable JAR file in the Java Projects folder"]

File name patterns:

* Shareable JAR: `_application_name_-_version_-SNAPSHOT-mule-application-light-package.jar`
* Deployable JAR: `_application_name_-_version_-SNAPSHOT-mule-application.jar`
Comment on lines +84 to +91
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the user can now set the file name and location in the export form, this information is outdated


[[publishable]]
== Publish a Mule Project to Exchange
Expand Down Expand Up @@ -199,4 +151,3 @@ The publication of your project as a new asset begins. After publication succeed
* xref:mule-runtime::package-a-mule-application.adoc[Package a Mule Application]
* xref:cloudhub::deploying-to-cloudhub.adoc[]
* xref:int-deploy-mule-apps.adoc[]

2 changes: 1 addition & 1 deletion modules/ROOT/pages/int-import-mule-project.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Use the desktop IDE to upload a project directory or shareable JAR file into a p

Import a shareable JAR file for a snapshot of a Mule project into the desktop IDE.

To create a shareable JAR file, see xref:int-export-mule-project.adoc#shareable[Export to a Shareable JAR File].
To create a shareable JAR, see xref:int-export-mule-project.adoc#export-mule-project[Export Mule Project].
The contents are lightweight because they don't include dependencies.
The IDE generates the dependencies configured in the `pom.xml` for the project.

Expand Down
12 changes: 2 additions & 10 deletions modules/ROOT/pages/ref-acb-commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,11 @@ MuleSoft: Download Mule Runtime and Java Versions
MuleSoft: Install Runtime
----

* Export a shareable JAR file that contains an integration or implementation project. Both types of projects are Mule applications. See xref:int-export-mule-project.adoc#shareable[Export to a Shareable JAR File].
* Create a shareable or deployable JAR from your project. See xref:int-export-mule-project.adoc#export-mule-project[Export Mule Project].
+
[source,command]
----
MuleSoft: Export Mule Application Sources
----

// recommended change-> Export Project to Mule Deployable JAR File
* Export a Mule project with its compiled code and all dependencies into a JAR file that you can deploy. See xref:int-export-mule-project.adoc#deployable[Export to a Deployable JAR File].
+
[source,command]
----
MuleSoft: Export Project to Mule Deployable Jar
MuleSoft: Export Mule Project
----

* Export a compressed file that contains your project’s workspace folders, logs, and information about environment variables, CPU, operating system, and system properties. See xref:troubleshooting.adoc#export-troubleshooting-info[Export Troubleshooting Information].
Expand Down