archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <>
Subject Re: Help understanding RepositoryContentConsumer API
Date Mon, 07 Jul 2014 05:09:13 GMT
It's close, but not quite the same meaning. The flag is for scanning a single file, vs. a whole
repo (either via the repositories page, or a scheduled job). Single files get consumed when
they are added via deployment/upload, for example.

A whole repo scan can either be incremental (files newer than "changesSince" in the scanner
instance), or process all ("changesSince" will probably be epoch/null). I thought that was
passed through to the consumer as "whenGathered", but it doesn't seem to be the case.

We could probably add some more hooks into the overall process if you wanted to propose such
a change?

Or is processing updates and deletions sufficient to maintain the metadata, without having
to start from scratch?

- Brett

On 5 Jul 2014, at 8:58 am, Matt Magoffin <""> wrote:

> Hello,
> I have been working on a RepositoryContentConsumer implementation to
> generate OSGi bundle repository metadata XML file. It mostly works, except
> that I think I'm not quite understanding the "executeOnEntireRepo" flag in
> this method:
> void beginScan( ManagedRepository repository, Date whenGathered, boolean
> executeOnEntireRepo ) throws ConsumerException;
> The issue I have is that I want to know if I am just performing an
> incremental scan of the repository vs. the entire repository, i.e. from
> executing "Directories Scanning" action from the web UI. If the scan is
> incremental, I want to preserve the existing OBR metadata and just add the
> changes, otherwise I want to generate the metadata file from scratch.
> I had thought the executeOnEntireRepo flag would tell me if the scan was
> incremental, but it does not seem that is true. Can you tell me then, from
> this API, how I might tell the difference between an incremental scan and
> a full scan?
> Cheers,
> Matt

View raw message