org.apache.maven.index.updater
Interface IndexUpdater
- All Known Implementing Classes:
- DefaultIndexUpdater
public interface IndexUpdater
An index updater provides functionality to update index for remote repositories using transfer format produced by the
IndexPacker
.
The following snippet shows how to update/download remote index:
IndexingContext context = indexer.getIndexingContexts().get( indexId );
Settings settings = embedder.getSettings();
Proxy proxy = settings.getActiveProxy();
ProxyInfo proxyInfo = null;
if ( proxy != null )
{
proxyInfo = new ProxyInfo();
proxyInfo.setHost( proxy.getHost() );
proxyInfo.setPort( proxy.getPort() );
proxyInfo.setNonProxyHosts( proxy.getNonProxyHosts() );
proxyInfo.setUserName( proxy.getUsername() );
proxyInfo.setPassword( proxy.getPassword() );
}
Date indexTime = updater.fetchAndUpdateIndex( context, transferListener, proxyInfo );
...
- Author:
- Jason van Zyl, Eugene Kuleshov
fetchAndUpdateIndex
IndexUpdateResult fetchAndUpdateIndex(IndexUpdateRequest updateRequest)
throws IOException
- Returns:
- IndexUpdateResult
- Throws:
IOException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.