private static String getVersionFromPom(String path) throws Exception {
    path += "pom.xml";
    Pattern regex = Pattern.compile("<version>(.*?)</version>", Pattern.DOTALL);
    Matcher matcher = regex.matcher(FileUtils.readFileToString(new File(path)));
    if (matcher.find()) {
      return matcher.group(1);
    } else return "dev";
  }
Loads resources as stream and the main reason for having the method is because it can be use
while testing and in production for loading files from within jar file.

@param resource The resource to load.
@return The input stream of the resource.
@throws SelendroidException if resource was not found.
selendroid-standalone/src/main/java/io/selendroid/standalone/builder/SelendroidServerBuilder.java