如果你進行調試,你會發現在某些時候你到達了org.eclipse.aether.internal.impl.SimpleLocalRepositoryManager類(位於aether-impl-1.0.2.v20150114.jar中),在其中有這樣的方法:
public LocalMetadataResult find(RepositorySystemSession session, LocalMetadataRequest request)
要解決當地的回購的版本,它會試圖找到在你的本地倉庫神器目錄下Maven的元數據local.xml中文件(別的下面的塊):
RemoteRepository remote = request.getRepository();
if (remote != null)
{
path = getPathForRemoteMetadata(metadata, remote, context);
}
else
{
path = getPathForLocalMetadata(metadata);
}
File file = new File(getRepository().getBasedir(), path);
它沒有得到登錄文件不存在,所以請確保您有maven-metadata-local.xml庫管理器期望它的位置:它應該在您安裝存根時創建在您當地的回購中。
它有時會發生,你只有遠程的,即maven-metadata.xml - 在這種情況下,jar解析會失敗。