Skip to end of metadata
Go to start of metadata

Given below are the best practices to follow for different file types when updating your products. Following these best practices ensures a seamless update process and a lower number of merge conflicts.

File TypeBest Practices
.jar files

Do not modify the original .jar files.

When updating your product, the WSO2 in-place tool replaces the existing .jar files with updated ones. If you modify the original .jar files, your customization will be lost. To avoid this, use an extension point as explained in Using Extension Points in Carbon and https://github.com/wso2-extensions. See https://store.wso2.com/store/pages/top-assets for a list of released connectors and extensions.

.war files

When updating your product, the WSO2 in-place tool unarchives your .war file (if applicable) and applies updates on top of your customizations(if applicable).

.car files

Do not modify the original .car files. In case your original product distribution contains .car files, do not modify them as they can be changed by continuous updates.

.jag/.js filesMaintain the same code indentation of the original .js files in the updated .js files.
.jks filesThe in-place update tool doesn't update .jks files.
.json files

Maintain the same code indentation of the original .json files in the updated .json files. Else, there will be merge conflicts.

 See example...

Shown below are examples of ways in which a .json file can be modificated incorrectly, causing merge conflicts in the WSO2 in-place update tool:

Maintain the order of the .json file as much as possible. For example, when you add a new key-value pair, add it to the end of the file.

 See example...

Shown below is an example of how a .json file has been modified incorrectly when adding a new key-value pair. There will not be merge conflicts when the new line is added to the end of the file, preserving the original order:

  • No labels