protected ResolvedResource[] listResources(Repository repository, ModuleRevisionId mrid, String pattern,
         Artifact artifact)
   {
      if (shouldUseMavenMetadata(pattern))
      {
         List revs = listRevisionsWithMavenMetadata(repository, mrid.getModuleId().getAttributes());
         if (revs != null)
         {
            Message.debug("\tfound revs: " + revs);
            List rres = new ArrayList();
            for (Iterator iter = revs.iterator(); iter.hasNext();)
            {
               String rev = (String) iter.next();
               ModuleRevisionId snapshotMrid = ModuleRevisionId.newInstance(mrid, rev);
               String realRev = findSnapshotVersion(snapshotMrid);
               String realPattern = pattern.replaceFirst("\\[revision\\]", "/" + rev);
               String resolvedPattern = IvyPatternHelper.substitute(realPattern, ModuleRevisionId.newInstance(snapshotMrid, realRev),
                     artifact);
               try
               {
                  Resource res = repository.getResource(resolvedPattern);
                  if ((res != null) && res.exists())
                  {
                     rres.add(new ResolvedResource(res, realRev));
                  }
               }
               catch (IOException e)
               {
                  Message.warn("impossible to get resource from name listed by maven-metadata.xml:" + rres + ": "
                        + e.getMessage());
               }
            }
            return (ResolvedResource[]) rres.toArray(new ResolvedResource[rres.size()]);
         }
         else
         {
            // maven metadata not available or something went wrong, 
            // use default listing capability
            return super.listResources(repository, mrid, pattern, artifact);
         }
      }
      else
      {
         return super.listResources(repository, mrid, pattern, artifact);
      }
   }