Anypoint Studio 7.2 and later simplifies the configuration of the
mule-artifact.json file. This file is used when packaging your Mule application to identify the class loader configuration and settings of your Mule application, and the minimum required Mule runtime version 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 make 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|
Note that this simplification is meant to reduce the number of declarations you need to keep track at development time using Anypoint Studio. A fully configured 'mule-artifact.json' is still required by the runtime when executing the packaged application. You can find the generated 'mule-artifact.json' file inside the
target directory after packaging.
The Mule Maven plugin checks the metadata declared in 'mule-artifact.json'. If there is a value that is not declared, the Mule Maven Plugin infers it from the application code before packaging.
If there are other metadata declared, it uses that information to package the application.
If you choose to update to the latest Mule Maven plugin, and to keep your old descriptor files, you’ll need to manually keep track of your descriptors metadata.
When you open Anypoint Studio 7.2 and use a workspace created with previous versions, Studio pops up a note:
Note that Studio lists all the projects whose configurations need updating.
Keep in mind that Anypoint Studio does not consider closed projects for this migration.
Clicking Perform update enables Studio to:
Update the Mule Maven Plugin version in the pom.xml file of your projects listed in this dialog.
Remove all declarations from the 'mule-artifact.json' files of the same listed projects.
This process overwrites your existing 'mule-artifact.json'. If you have other declarations in your 'mule-artifact.json' that you want to preserve (for example, secureProperties declarations, redeploymentEnabled, etc.), you should back up those files outside of your workspace, perform the migration, and then restore your old 'mule-artifact.json' files.
We strongly recommend not to preserve the following declarations: configs, name, requiredProduct, classLoaderModelLoaderDescriptor and bundleDescriptorLoader