Contact Free trial Login

Update Workspaces

Anypoint Studio helps you to ensure that you are using the latest Mule Maven configuration.

When Studio runs in a new workspace for the first time, it validates the configuration files of your projects in that workspace. When Studio finds projects using a deprecated version of the Mule Maven plugin, it prompts you to perform an update to continue those projects in your current Studio version:

update workspaces
1 Studio lists all the open projects in your workspace that must be updated.
2 Selecting Perform update enables Studio to update the Mule Maven Plugin version in the pom.xml file of your projects listed in this dialog.

Update Workspaces Created With Studio 7.1.x and Earlier Versions

Anypoint Studio 7.2 and later simplifies the configuration of the mule-artifact.json file. When packaging your Mule application, this file is used to identify the application’s classloader configuration and settings, and the minimum required Mule runtime engine version required to run your application.

Anypoint Studio includes a new version of the Mule Maven Plugin that can automatically infer some of this required metadata. This makes it easier for you to keep track of all the declarations you need to make when exporting resources.

mule-artifact.json in 7.1.x mule-artifact.json in 7.2 and later
{
  "configs": [
    "ch-usage-sync.xml"
  ],
  "redeploymentEnabled": true,
  "name": "ch-usage-sync",
  "minMuleVersion": "4.0.0",
  "requiredProduct": "MULE_EE",
  "classLoaderModelLoaderDescriptor": {
    "id": "mule",
    "attributes": {
      "exportedResources": []
    }
  },
  "bundleDescriptorLoader": {
    "id": "mule",
    "attributes": {}
  }
}
{
  "minMuleVersion": "4.0.0",
}

This simplification reduces the number of declarations you need to monitor during development. A fully configured mule-artifact.json file is still required by Mule runtime engine when executing the packaged application. You can find the generated mule-artifact.json file inside the target directory after packaging.

The plugin inspects the metadata declared in mule-artifact.json. If a value is not declared, the plugin infers it from the application code before packaging. If other metadata is declared, the plugin uses it to package the application.

If you update to the latest plugin but choose to keep your former descriptor files, you must manually monitor your descriptor metadata.

When you update a workspace created using Studio 7.1.x and earlier, Studio overwrites your existing mule-artifact.json file. If you have other declarations in mule-artifact.json that you want to preserve (for example, secureProperties, or redeploymentEnabled), you should back up those files outside of your workspace, perform the migration, and then restore your old mule-artifact.json files.

Do not to preserve the following declarations:

  • configs

  • name

  • requiredProduct

  • classLoaderModelLoaderDescriptor

  • bundleDescriptorLoader

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub