Hi Mathijs,

On Wed, Sep 3, 2014 at 1:27 AM, Mathijs den Burger
<[email protected]> wrote:
> Hi,
>
> I'm forwarding this question to the dev list, which seems more
> appropriate then the users list.
>
> I'm trying to use FileVault to automatically sync a local directory
> from filesystem into a Hippo repository (which is based on
> JackRabbit). The main reason for using FileVault is the automatic
> handling of meta-data in the .content.xml files.
>
> So far I've successfully used the Importer class to import an Archive
> based on files or a zip file. I've also implemented a simple file
> watcher that triggers a reimport whenever something changes. This
> nicely imports changes and newly added files and directories. So far
> so good.

great!

> The problem is that deleting files or directories does not delete
> their counterparts in JCR. I'd expect that using ImportMode.REPLACE
> would completely replace the JCR node structure and automatically
> delete everything that is no longer present in the imported archive,
> but that's not the case.

how to you setup the WorkspaceFilter ? Only nodes covered by the
filter are updated. IIRC, if you don't use a filter at all, the
importer only does updates.

> Reading through code it seems the vlt tool uses the meta-data in the
> .vlt directory to track deleted files, which are then processed during
> a commit. Is there a way to add such meta-data to an Archive or
> educate the Importer somehow?

The vault cli tool works completely different than the packageing. it
mimics a subversion like behaviour and is probably unsuited for your
needs. The main magic is done in the
org.apache.jackrabbit.vault.fs.impl.TransactionImpl which uses the
recorded changes to figure out which nodes to sync.

> I've also read through the code of the vault-sync tool, which
> basically implements my use case. I cannot use it as-is though, since
> Hippo does not use OSGI. IIUC vault-sync does not use Archives or
> Packages at all, but uses its own TreeSync class that does lots of
> plain JCR calls. Does that mean that vault-sync does not process
> meta-data files at all?

no. currently vault-sync only handle simple files and folders.

regards, toby

Reply via email to