public void addArtifactToIndex( String repository, File artifactFile, String groupId, String artifactId,
String version, String extension, String classifier )
throws IOException
{
ArtifactInfo artifactInfo = new ArtifactInfo( repository, groupId, artifactId, version, classifier, extension );
if ( extension != null )
{
artifactInfo.setFieldValue( MAVEN.EXTENSION, extension );
}
LOGGER.debug( "Adding artifact: {}; repo: {}; type: {}",
new String[]{ artifactInfo.getUinfo(), repository, extension } );
getIndexer().addArtifactsToIndex(
asList( new ArtifactContext( null, artifactFile, null, artifactInfo, artifactInfo.calculateGav() ) ),
indexingContext );
}