def get_pom_from_sha1(file)
      log.debug("Attempting SHA1 POM lookup for #{file}")
      begin
        if File.file?(file)
          site = MavenWebsite.new
          sha1 = Digest::SHA1.hexdigest File.read(file)
          results = site.search_by_sha1(sha1).select { |result| result["ec"].include?(".pom") }
          result = results.first
          unless result.nil?
            log.info("pom.xml for #{file} found on search.maven.org for sha1 #{sha1}\
              (#{result['g']}:#{result['a']}:#{result['v']})"
                    )
            group_id, artifact_id, version = site.get_maven_id_from result
            return site.download_pom(group_id, artifact_id, version), :found_via_sha1
          end
        end
      rescue NotFoundOnMavenWebsiteError
        log.warn("Got a 404 error while looking for #{file}'s SHA1 in search.maven.org")
      end
      nil
    end
def get_pom_from_sha1(file)
      log.debug("Attempting SHA1 POM lookup for #{file}")
      begin
        if File.file?(file)
          site = MavenWebsite.new
          sha1 = Digest::SHA1.hexdigest File.read(file)
          results = site.search_by_sha1(sha1).select { |result| result["ec"].include?(".pom") }
          result = results.first
          unless result.nil?
            log.info("pom.xml for #{file} found on search.maven.org for sha1 #{sha1}\
              (#{result['g']}:#{result['a']}:#{result['v']})"
                    )
            group_id, artifact_id, version = site.get_maven_id_from result
            return site.download_pom(group_id, artifact_id, version), :found_via_sha1
          end
        end
      rescue NotFoundOnMavenWebsiteError
        log.warn("Got a 404 error while looking for #{file}'s SHA1 in search.maven.org")
      end
      nil
    end
returns a pom from search.maven.org with a jar sha1 search