Package org.apache.maven.index.updater

Examples of org.apache.maven.index.updater.IndexUpdateResult


      updateRequest.setDocumentFilter(getFilterFor(mrepository.getRepositoryPolicy()));
    }

    try {
      IndexUpdateResult result = indexUpdater.fetchAndUpdateIndex(updateRequest);

      //Check if successful
      if (!result.isSuccessful()) {
        //This condition occurs when we have requested an incremental-only update,
        //but it could not be completed. In this case, we need to request a full update
        //This needs to be communicated upstream so that the proper locking can take place
        throw new IncrementalIndexUpdateException("Cannot incrementally update index. Request a full update");
      }
      boolean hasRemoteIndexUpdate = result.getTimestamp() != null;

      if (hasRemoteIndexUpdate) {
        log.info(RepositoryStringUtils.getFormattedMessage(
            "Remote indexes updated successfully for repository %s", repository));
      }
View Full Code Here

TOP

Related Classes of org.apache.maven.index.updater.IndexUpdateResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.