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 Type||Best Practices|
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.
Do not modify .war files.
It is not recommended to modify .war files. In case you have modified .war files in your distribution, after updating your product distribution, reapply your modifications in the updated .war 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 files||Maintain the same code indentation of the original .js files in the updated .js files.|
|.jks files||The in-place update tool doesn't update .jks files.|
Maintain the same code indentation of the original .json files in the updated .json files. Else, there will be merge conflicts.
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.