You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Johan Ruttens <jo...@gmail.com> on 2017/08/01 12:20:17 UTC

Add file to jcr vaultpackage

Hi,

We are working on some custom functionality related to the export of
packages.
In short we want to add a custom file (xml or some other format) to
_package_/META-INF/vault (that is inside the zip file).

At the moment we found a way by partly overriding the JcrPackageManagerImpl
and JarExporter classes, but this is not the nicest solution.

Anyone any ideas on how this can be achieved ?

Pointers are much appreciated.


Thanks!

Re: Add file to jcr vaultpackage

Posted by Tobias Bocanegra <tr...@bocanegra.ch>.
Hi Johan,

I didn't test it, but maybe you can add more files providing an ExportPostProcessor [0] in the export options.
you should be able to invoke `writeFile` [1] on the provided exporter.

regards, toby

[0] https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/ExportPostProcessor.java
[1] https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/AbstractExporter.java#L382

> -------- Original Message --------
> Subject: Add file to jcr vaultpackage
> Local Time: August 1, 2017 9:20 PM
> UTC Time: August 1, 2017 12:20 PM
> From: johan.ruttens@gmail.com
> To: dev@jackrabbit.apache.org
>
> Hi,
>
> We are working on some custom functionality related to the export of packages.
> In short we want to add a custom file (xml or some other format) to _package_/META-INF/vault (that is inside the zip file).
>
> At the moment we found a way by partly overriding the JcrPackageManagerImpl and JarExporter classes, but this is not the nicest solution.
>
> Anyone any ideas on how this can be achieved ?
>
> Pointers are much appreciated.
>
> Thanks!