code: private static String parseFilePath(String file)
      {
          final String excludePattern = "/META-INF/persistence.xml";
          file = file.substring(0, file.length() - excludePattern.length());
  
          // in case protocol is "file".
          file = file.endsWith("!") ? file.substring(0, file.length() - 1) : file;
  
          return file;
      }
docs: Parse and exclude path till META-INF
  
  @param file
  raw file path.
  @return extracted/parsed file path.