public static boolean isRepositoryUrlValid(@NotNull String repository) {
    if (repository.isEmpty()) return false;
    try {
      if (new URI(repository).isAbsolute()) {
        return true;
      }
    }
    catch (URISyntaxException urlExp) {
      // do nothing
    }

    // Is it SSH URL?
    if (SSH_URL_PATTERN.matcher(repository).matches()) {
      return true;
    }
    return false;
  }
public static boolean isRepositoryUrlValid(@NotNull String repository)