import org.apache.maven.index.QueryCreator;
import org.apache.maven.index.ScanningResult;
import org.apache.maven.index.context.IndexingContext;
+import org.apache.maven.index.shaded.lucene.index.IndexUpgrader;
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import org.junit.After;
@Override
public void scanningStarted( IndexingContext ctx )
{
-
+ //
}
@Override
public void scanningFinished( IndexingContext ctx, ScanningResult result )
{
-
+ // no op
}
@Override
@Override
public void artifactDiscovered( ArtifactContext ac )
{
- log.debug( "artifactDiscovered {}:{}", ac.getArtifact().getPath(), ac.getArtifactInfo() );
+ log.debug( "artifactDiscovered {}:{}", //
+ ac.getArtifact() == null ? "" : ac.getArtifact().getPath(), //
+ ac.getArtifact() == null ? "" : ac.getArtifactInfo() );
}
}
if ( !repository.isSkipPackedIndexCreation() )
{
- IndexPackingRequest request = new IndexPackingRequest( context, context.getIndexDirectoryFile() );
+ IndexPackingRequest request = new IndexPackingRequest( context, //
+ context.acquireIndexSearcher().getIndexReader(), //
+ context.getIndexDirectoryFile() );
indexPacker.packIndex( request );
context.updateTimestamp( true );