for ( File artifactFile : filesToBeIndexed )
{
assertTrue( "file not exists " + artifactFile.getPath(), artifactFile.exists() );
ArtifactContext ac = artifactContextProducer.getArtifactContext( context, artifactFile );
nexusIndexer.addArtifactToIndex( ac, context );
context.updateTimestamp( true );
}
if ( scan )
{
nexusIndexer.scan( context, new ArtifactScanListener(), false );