All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jamesii.mlrules.gui.MavenOutputHandler Maven / Gradle / Ivy

Go to download

The main project for the external domain-specific modeling language ML-Rules, which is used to model hierarchical biochemical reaction networks with nested and attributed species

There is a newer version: 2.2.13-headless
Show newest version
package org.jamesii.mlrules.gui;

import org.apache.maven.shared.invoker.InvocationOutputHandler;

import java.util.ArrayList;
import java.util.List;

/**
 * Detect the lines of the plugins that can be updated.
 *
 * @author: Tobias Helms
 */
public class MavenOutputHandler implements InvocationOutputHandler {

  private boolean updates = false;

  private List outdatedDependencies = new ArrayList<>();

  public void consumeLine( String line ) {
    if (line.endsWith("[INFO] ")) {
      updates = false;
    }
    if (updates) {
      outdatedDependencies.add(line.substring(9));
    }
    if (line.contains("[INFO] The following dependencies in Dependencies have newer versions:")) {
      updates = true;
    }
  }

  List getOutdatedDependencies() {
    return outdatedDependencies;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy