private LocallyAvailableExternalResource downloadStaticResource(List<ResourcePattern> patternList, final ModuleComponentArtifactMetaData artifact, ResourceAwareResolveResult result) {
for (ResourcePattern resourcePattern : patternList) {
ExternalResourceName location = resourcePattern.getLocation(artifact);
result.attempted(location);
LOGGER.debug("Loading {}", location);
LocallyAvailableResourceCandidates localCandidates = locallyAvailableResourceFinder.findCandidates(artifact);
try {
LocallyAvailableExternalResource resource = resourceAccessor.getResource(location.getUri(), new CacheAwareExternalResourceAccessor.ResourceFileStore() {
public LocallyAvailableResource moveIntoCache(File downloadedResource) {
return fileStore.move(artifact, downloadedResource);
}