Esempio n. 1
0
  private static String resolveVersion(File pluginDir) {
    List<String> versions = new ArrayList<String>();

    File[] children;
    try {
      children = pluginDir.listFiles();
      if (children == null) return "";
    } catch (Exception e) {
      MavenLog.LOG.warn(e);
      return "";
    }

    for (File version : children) {
      if (version.isDirectory()) {
        versions.add(version.getName());
      }
    }

    if (versions.isEmpty()) return "";

    Collections.sort(versions);
    return versions.get(versions.size() - 1);
  }
Esempio n. 2
0
 public static void showError(Project project, String title, Throwable e) {
   MavenLog.LOG.warn(title, e);
   Notifications.Bus.notify(
       new Notification(MAVEN_NOTIFICATION_GROUP, title, e.getMessage(), NotificationType.ERROR),
       project);
 }