Community
Participate
Working Groups
Cloned to track release into the R36x branch. +++ This bug was initially created as a clone of Bug #335153 +++ ProvisioningContext itself has a private method named 'getLoadedArtifactRepositories' that is sorted all the available repositories, the local repository has higher priority. There is no public API to get all artifact repositories from ProvisioningContext, so clients use below query to query out all the artifact repositories from ProvisioningContext instance like DownloadManager. The query result is stored by a set container that never keeps the results in a certain sequence. If some artifact keys with same id and version in both local repository and remote repository, DownloadManager probably downloads them from remote repository. It's very annoying to cost much more time and bandwidth to download them. The code snippet of DownloadManager.start(): IQueryable<IArtifactRepository> repoQueryable = provContext.getArtifactRepositories(subMonitor.newChild(250)); IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION); IArtifactRepository[] repositories = repoQueryable.query(all, subMonitor.newChild(250)).toArray(IArtifactRepository.class); The fix for DownloadManager is sorting the array of query result again. Maybe it's better and common to add public interface to get sorted repositories on ProvisioningContext.
Created attachment 187774 [details] patch Patch for R36x branch.
Adding Tom to CC for PMC approval.
Tom is away this week, added Jeff for PMC approval instead.
guess I am "less off" this week so here you go
You are voted most likely to check his email. We know you too well. :-) Thanks.
Released to branch.