You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
11
11
12
-
* A <<shareable, shareable JAR file>> is lightweight, packaging only the source code of the application.
13
-
The source code includes configuration files but not libraries or other dependencies required for your application to run and deploy successfully.
14
-
+
15
-
The IDEs generate the dependencies automatically based on the settings in the POM file (`pom.xml`).
16
-
+
17
-
You or your teammates can import the JAR file and continue developing in Anypoint Code Builder or Anypoint Studio (Studio).
18
-
19
-
* A <<deployable, deployable JAR file>> contains the compiled code and all dependencies.
20
-
+
21
-
You can deploy the JAR file to any supported environment, such as CloudHub or on-premises.
22
-
+
23
-
To deploy a JAR file to CloudHub, see
24
-
xref:cloudhub::deploying-to-cloudhub.adoc[].
25
-
+
26
-
You don't need to create a deployable JAR file to deploy to CloudHub.
27
-
To deploy an app directly from Anypoint Code Builder, see
28
-
xref:int-deploy-mule-apps.adoc[].
29
-
30
-
* A <<publishable, publishable Mule project template or example>> contains resources to share the project via Anypoint Exchange.
31
-
+
32
-
You or your teammates can import the Mule project from Exchange and continue developing in Anypoint Code Builder or Studio.
33
-
34
-
== Before You Begin
35
-
36
-
* xref:start-acb.adoc[Set up and access the web or desktop IDE].
37
-
* xref:int-create-integrations.adoc[Create an integration].
38
-
39
-
40
12
[[shareable]]
41
-
== Export to a Shareable JAR File
13
+
== Shareable JAR
14
+
15
+
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.
42
16
43
-
When you export a Mule project, the shareable JAR file includes these files:
17
+
The shareable JAR includes:
44
18
45
19
* The configuration XML and other files in the `src` folder, including resource files
46
20
* `mule-artifact.json`
47
21
* `pom.xml`
48
22
49
-
To generate a shareable JAR file:
23
+
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).
50
24
51
-
. Open and place your cursor in the configuration XML file in a project for the Mule application to export.
This command is equivalent to the command sequence `Task: Run Task` > `mule` > `mule: Package Only Sources`.
62
-
+
63
-
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.
64
-
. Find or download the JAR file by following the prompts that appear in the IDE after the packaging process completes successfully:
65
-
+
66
-
** In the desktop IDE, click *Open Folder* to open the directory that contains the JAR file in the Explorer view.
67
-
// +
68
-
// 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`.
25
+
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].
69
26
70
-
** In the cloud IDE, click *Download File* to download the JAR file to a directory on your local machine:
71
-
+
72
-
--
73
-
** For a JAR file that is 32 MB or smaller, the IDE automatically downloads the file to your Downloads folder.
74
-
** 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.
75
-
+
76
-
... Select a folder for the download.
77
-
... At the prompt, click *View files* to allow the site to view the files in the folder you select.
78
-
... Click *Save Changes*.
79
-
--
80
-
// +
81
-
// 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`.
82
-
+
83
-
The terminal window in the IDE also provides the path to the JAR, in the `/target` directory under your project folder.
84
-
// but good luck finding it!
27
+
[[deployable]]
28
+
== Deployable JAR
85
29
86
-
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`.
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.
87
31
88
-
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].
89
-
// To import to Anypoint Studio, see xref:studio::import-export-packages.adoc[].
32
+
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.
33
+
* To deploy an app directly from Anypoint Code Builder, see xref:int-deploy-mule-apps.adoc[].
34
+
* To deploy a JAR file to CloudHub, see xref:cloudhub::deploying-to-cloudhub.adoc[].
90
35
36
+
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].
91
37
92
-
[[deployable]]
93
-
== Export to a Deployable JAR File
38
+
== Before You Begin
94
39
95
-
When you export a Mule project, Anypoint Code Builder packages the compiled code and all dependencies into a distributable JAR.
40
+
* xref:start-acb.adoc[Set up and access the web or desktop IDE].
41
+
* xref:int-create-integrations.adoc[Create an integration].
96
42
97
-
Deployment procedures vary by Mule runtime host and deployment mechanism.
98
-
For example, you can deploy to CloudHub through the Runtime Manager UI or REST API.
99
-
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].
43
+
[[export-mule-project]]
44
+
== Export Mule Project
100
45
101
-
To generate a deployable JAR file:
46
+
To create a deployable or shareable JAR file from your project:
102
47
103
-
. Open and place your cursor in the configuration XML file in a project for the Mule application to export.
104
-
// Pointer to Command Palette
48
+
. Open the configuration XML file in a project for the Mule application to export.
49
+
//. 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`.
This command is equivalent to the command sequence `Task: Run Task` > `mule` > `mule: Package`.
114
-
+
115
-
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.
116
-
+
117
-
. Find or download the JAR file by following the prompts that appear in the IDE after the packaging process completes successfully:
59
+
. Alternatively, right-click the configuration XML file in the Explorer and select *Export Mule Project*.
60
+
. In the Export Mule Project dialog, under *Select an Export Type* choose *Deployable JAR* or *Shareable JAR*.
118
61
+
119
-
** *In the desktop IDE*, click *Open Folder* to open the directory that contains the JAR file in the Explorer view.
120
-
// +
121
-
// 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`.
122
-
+
123
-
The terminal window in the IDE also provides the path to the JAR, in the `/target` directory under your project folder.
124
-
In the Desktop IDE, you can find the JAR file in the Explorer, under Java Projects:
125
-
+
126
-
image::int-export-deployable.png["Deployable JAR file in the Java Projects folder"]
62
+
For *Deployable JAR*, you can select *Include project sources*.
63
+
. Set the file name and location for the exported file.
64
+
. Click *Export*.
65
+
. 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.
127
66
128
-
* *In the cloud IDE*, click *Download File* to download the JAR file to a directory on your local machine.
67
+
[[find-download-jar]]
68
+
=== Find or download the JAR
69
+
70
+
When packaging completes, find or download the JAR file by following the prompts that appear in the IDE:
71
+
72
+
* In the desktop IDE, click *Open Folder* to open the directory that contains the JAR file in the Explorer view.
73
+
* In the cloud IDE, click *Download File* to download the JAR file to a directory on your local machine:
129
74
+
130
75
--
131
-
** For a JAR file that is 32 MB or smaller, the IDE automatically downloads the file to your Downloads folder.
76
+
** For a JAR file that is 32 MB or smaller, the IDE automatically downloads the file to your Downloads folder.
132
77
** 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.
133
78
+
134
79
... Select a folder for the download.
135
80
... At the prompt, click *View files* to allow the site to view the files in the folder you select.
136
81
... Click *Save Changes*.
137
82
--
138
83
139
-
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`.
84
+
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:
85
+
86
+
image::int-export-deployable.png["Deployable JAR file in the Java Projects folder"]
87
+
140
88
141
89
[[publishable]]
142
90
== Publish a Mule Project to Exchange
@@ -199,4 +147,3 @@ The publication of your project as a new asset begins. After publication succeed
199
147
* xref:mule-runtime::package-a-mule-application.adoc[Package a Mule Application]
* 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].
79
+
* Create a shareable or deployable JAR from your project. See xref:int-export-mule-project.adoc#export-mule-project[Export Mule Project].
80
80
+
81
81
[source,command]
82
82
----
83
-
MuleSoft: Export Mule Application Sources
84
-
----
85
-
86
-
// recommended change-> Export Project to Mule Deployable JAR File
87
-
* 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].
88
-
+
89
-
[source,command]
90
-
----
91
-
MuleSoft: Export Project to Mule Deployable Jar
83
+
MuleSoft: Export Mule Project
92
84
----
93
85
94
86
* 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].
0 commit comments