private static void addToClassPath(Class<?> aClass, Set<String> result) {
    Path path = PathManager.getJarForClass(aClass);
    if (path == null) {
      return;
    }

    final String pathString = path.toString();

    if (result.add(pathString) && pathString.endsWith("app.jar") && path.getFileName().toString().equals("app.jar")) {
      if (path.getParent().equals(Paths.get(PathManager.getLibPath()))) {
        LOG.error("Due to " + aClass.getName() + " requirement, inappropriate " + pathString + " is added to build process classpath");
      }
    }
  }
private static void addToClassPath(Class<?> aClass, Set<String> result)