Search in sources :

Example 1 with JarFileContentsIndexCreator

use of org.sonatype.nexus.index.creator.JarFileContentsIndexCreator in project intellij-community by JetBrains.

the class Maven3ServerIndexerImpl method createIndex.

@Override
public int createIndex(@NotNull String indexId, @NotNull String repositoryId, @Nullable File file, @Nullable String url, @NotNull File indexDir) throws RemoteException, MavenServerIndexerException {
    try {
        IndexingContext context = myIndexer.addIndexingContextForced(indexId, repositoryId, file, indexDir, url, // repo update url
        null, Arrays.asList(new MinimalArtifactInfoIndexCreator(), new JarFileContentsIndexCreator()));
        int id = System.identityHashCode(context);
        myIndices.put(id, context);
        return id;
    } catch (Exception e) {
        throw new MavenServerIndexerException(wrapException(e));
    }
}
Also used : IndexingContext(org.sonatype.nexus.index.context.IndexingContext) MinimalArtifactInfoIndexCreator(org.sonatype.nexus.index.creator.MinimalArtifactInfoIndexCreator) JarFileContentsIndexCreator(org.sonatype.nexus.index.creator.JarFileContentsIndexCreator) ProcessCanceledException(com.intellij.openapi.progress.ProcessCanceledException) ArchetypeDataSourceException(org.apache.maven.archetype.source.ArchetypeDataSourceException) IOException(java.io.IOException) InvocationTargetException(java.lang.reflect.InvocationTargetException) RemoteException(java.rmi.RemoteException)

Aggregations

ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 RemoteException (java.rmi.RemoteException)1 ArchetypeDataSourceException (org.apache.maven.archetype.source.ArchetypeDataSourceException)1 IndexingContext (org.sonatype.nexus.index.context.IndexingContext)1 JarFileContentsIndexCreator (org.sonatype.nexus.index.creator.JarFileContentsIndexCreator)1 MinimalArtifactInfoIndexCreator (org.sonatype.nexus.index.creator.MinimalArtifactInfoIndexCreator)1