repository = artifactRepositoryFactory.createArtifactRepository( "default", repositoryDir, defaultLayout,
null, null );
}
catch ( MalformedURLException e )
{
throw new RepositoryConversionException( "Error convering legacy repository.", e );
}
try
{
List consumers = new ArrayList();
legacyConverterConsumer.setDestinationRepository( repository );
consumers.add( legacyConverterConsumer );
discoverer.walkRepository( legacyRepository, consumers, includeSnapshots );
}
catch ( DiscovererException e )
{
throw new RepositoryConversionException(
"Unable to convert repository due to discoverer error:" + e.getMessage(), e );
}
}