Implement a custom Package Exporter for Sling Distribution
Requirement:
Currently, the Sling Distribution Forward Agents utilize the Apache Sling Distribution Packaging – Vault Package Builder Factory to export packages. However, I want to configure a custom Package Builder that can export or replicate files in their native format instead of using the Vault packaging mechanism.
In other words, the goal is to export the content as-is — for example:
If the file is a JSON, it should be exported as a JSON file.
If it’s an HTML file, export it as HTML.
If it’s an image, export it as an image.
At present, the default Vault packaging exports the data in a binary (vault) format, which is not desirable for this use case.
I would like to understand whether this can be achieved through configuration or if it requires a custom code implementation, so I can proceed accordingly.



Currently using the default vault packaging in my forward agent :
