Import and Export Projects
Anypoint Studio supports the ability to import and export your projects or various project elements.
This document outlines the procedures to import or export information pertaining to your Studio projects.
Because Studio is Eclipse-based, keep in mind that among the import/export options, there are ways to import or export projects that are not tailored for Mule projects and that are not recommended for use.
Import Projects to Studio
Studio presents two importing options.
Option | Action |
---|---|
Packaged Mule Application (.jar) |
Imports a |
Anypoint Studio Project from File System |
Imports a folder and its contents as a new Mule project. |
Import a Mule Application (Deployable Archive)
-
Select Import from the File menu.
-
In the Import wizard, click to expand the Mule folder, select Packaged Mule Application (.jar), and click Next.
-
In the File field, click the ellipses (…) button to explore your local drive. Then select the Mule Deployable Archive file (that is, the
.jar
file) you want to import.
If you want, you can change project’s name. -
Click Finish.
When you import a project that was developed in Studio 7.1.x or older versions of Studio 7, Studio will prompt you to Update your Workspace. See Update Workspaces for more details. |
Import a Mule Application (Project From File System)
-
Select Import from the File menu.
-
In the Import wizard, click to expand the Mule folder, select Anypoint Studio Project from File System, and click Next.
-
In the Project Root field, click the ellipses (…) button to explore your local drive, and select the root folder for the Mule project that you want to import.
If you want, you can change the project’s name and choose a different runtime version in which to run it.You can choose a different runtime version if you have other embedded runtime versions installed in Studio.
See Mule Runtimes for Anypoint Studio Update Site in About Anypoint Studio Update Sites to learn how to install other versions of the runtime in Studio.
Export Projects From Studio
Studio lets you package and export your project as a Mule deployable file.
Option | Action |
---|---|
Anypoint Studio Project to Mule Deployable Archive (includes Studio metadata) |
Exports a Mule project to a |
Export a Studio Project to a Deployable Mule Application
-
Select Export from the File menu.
-
In the Import wizard, click to expand the Mule folder, select Anypoint Studio Project to Mule Deployable Archive (includes Studio metadata), and click Next.
-
Select the project that you want to export and click Next.
-
In the JAR file menu, click the ellipses (…) button to explore your local drive, and select the folder to which you want to export your deployable JAR file.
Additionally, you can choose Attach Project Sources to include metadata that Studio requires to reimport the deployable file as an open Mule project into your workspace.You must keep the Attach Project Sources option selected to be able to import the packaged JAR file back into a Studio workspace. This is the same as using the
-DattachMuleSources
flag when packaging using the Mule Maven Plugin. See Create an Application Package to Import into Anypoint Studio in the Mule Maven Plugin documentation for more information.
Export a Studio Project to a Shareable Lightweight Package
-
Select Export from the File menu.
-
In the Import wizard, click to expand the Mule folder, select Anypoint Studio Project to Mule Deployable Archive (includes Studio metadata), and click Next.
-
Select the project that you want to export and click Next.
-
In the JAR file menu, click the ellipses (…) button to explore your local drive, and select the folder to which you want to export your JAR deployable file.
-
Deselect the Include project modules and dependencies option.
This option skips bundling the actual modules and external dependencies required to run the Mule application in a Mule runtime engine, creating a lightweight JAR file package that does not include any dependencies specified in the Mule application’spom.xml
file.The generated JAR file is not a functional deployable archive and cannot be deployed to a Mule runtime engine, but instead offers a way to archive only the source files that make up the Mule application. This is the same as using the
-lightWeightPackage
flag when packaging using the Mule Maven Plugin and is useful if you want to distribute your project to other Studio installations because it only keeps a reference to all its dependencies. When you import a lightweight package into Studio, all your dependencies are automatically downloaded. See Create a Lightweight Package in the Mule Maven Plugin documentation for more information.