code:     public boolean contains(Artifact artifact) {
          // Note: getLocation(artifact) does an artifact.isResolved() check - no need to do it here.
          File location = getLocation(artifact);
          return location.canRead() && (location.isFile() || new File(location, "META-INF").isDirectory());
      }
  
  