code: def get_maven_id(jar_path):
          
          props = {}
          try:
              with zipfile.ZipFile(jar_path) as f:
                  r = re.compile("META-INF/maven/[^/]+/[^/]+/pom.properties$")
                  result = [x for x in f.namelist() if r.match(x)]
                  if len(result) != 1:
                      return None
                  with f.open(result[0]) as props_f:
                      for line in props_f.readlines():
                          line = line.strip()
                          if not line.startswith(b"#"):
                              try:
                                  (key, value) = line.split(b"=")
                                  key = key.decode('utf8').strip()
                                  value = value.decode('utf8').strip()
                                  props[key] = value
                              except ValueError:
                                  return None
          except IOError:
              pass
          return props
docs: Extract Maven coordinates from a given JAR file, if possible.
  
          JARs build by Maven (most popular Java build system) contain
          'pom.properties' file. We can extract Maven coordinates
           from there.