throws IOException
{
final DiscoveryResult<MavenRepository> discoveryResult =
new DiscoveryResult<MavenRepository>(mavenRepository);
// NEXUS-6485: Since this fix, prefixes will do include empty directories due to "depth" optimization
final WalkerContext context =
new DefaultWalkerContext(mavenRepository, new ResourceStoreRequest("/"),
new DepthLimitedStoreWalkerFilter(config.getLocalScrapeDepth()),
true);
final PrefixCollectorProcessor prefixCollectorProcessor = new PrefixCollectorProcessor();
context.getProcessors().add(prefixCollectorProcessor);
try {
walker.walk(context);
final ParentOMatic parentOMatic = prefixCollectorProcessor.getParentOMatic();
if (parentOMatic.getRoot().isLeaf()) {