Class Maven

java.lang.Object
io.fabric8.maven.Maven

public final class Maven extends Object
Author:
George Gastaldi
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.maven.model.Model
    Create a new Maven Model
    static org.apache.maven.model.Model
    readModel(InputStream inputStream)
    Read the InputStream as a Model
    static org.apache.maven.model.Model
    Read the Path as a Model
    static org.apache.maven.model.Model
    A String version that makes it easier to be called from other languages
    static org.apache.maven.model.Model
    Read the Path as a Model
    static void
    writeModel(org.apache.maven.model.Model model)
    Shortcut to writeModel(model,model.getPomFile().toPath());
    static void
    writeModel(org.apache.maven.model.Model model, Writer writer)
    Shortcut to writeModel(model,model.getPomFile().toPath(),writer);
    static void
    writeModel(org.apache.maven.model.Model model, Writer writer, XMLFormat format)
    Shortcut to writeModel(model,model.getPomFile().toPath(),writer, format);
    static void
    writeModel(org.apache.maven.model.Model model, Path pom)
    Write the Model back to the provided Path
    static void
    writeModel(org.apache.maven.model.Model model, Path pom, XMLFormat format)
    Write the Model back to the provided Path using the specified XMLFormat
    static void
    writeModel(org.apache.maven.model.Model model, Path pom, Writer writer)
    Write the Model to the Writer using the provided Path as a reference
    static void
    writeModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier)
    Write the Model to the Writer using the provided Path as a reference
    static void
    writeModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier, XMLFormat format)
    Write the Model to the Writer using the provided Path as a reference

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newModel

      public static org.apache.maven.model.Model newModel()
      Create a new Maven Model
      Returns:
      a new Model
    • readModel

      public static org.apache.maven.model.Model readModel(String path)
      A String version that makes it easier to be called from other languages
      See Also:
    • readModel

      public static org.apache.maven.model.Model readModel(Path pom)
      Read the Path as a Model
      Parameters:
      pom - a path to a pom.xml file
      Returns:
      the maven Model
    • readModel

      public static org.apache.maven.model.Model readModel(Reader rdr)
      Read the Path as a Model
      Parameters:
      rdr - a Reader on the contents of a pom file
      Returns:
      the maven Model
    • readModel

      public static org.apache.maven.model.Model readModel(InputStream inputStream)
      Read the InputStream as a Model
      Parameters:
      inputStream - an input stream of a pom.xml file
      Returns:
      the maven Model
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model)
      Shortcut to writeModel(model,model.getPomFile().toPath());
      Parameters:
      model - the model to write
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Path pom)
      Write the Model back to the provided Path
      Parameters:
      model - the model to write
      pom - the path to the POM file
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Path pom, XMLFormat format)
      Write the Model back to the provided Path using the specified XMLFormat
      Parameters:
      model - the model to write
      pom - the path to the POM file
      format - the XML format to use
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Writer writer)
      Shortcut to writeModel(model,model.getPomFile().toPath(),writer);
      Parameters:
      model - the model to write
      writer - the writer to write the model to
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Writer writer, XMLFormat format)
      Shortcut to writeModel(model,model.getPomFile().toPath(),writer, format);
      Parameters:
      model - the model to write
      writer - the writer to write the model to
      format - the XML format to use
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Path pom, Writer writer)
      Write the Model to the Writer using the provided Path as a reference
      Parameters:
      model - the model to write
      pom - the path to the POM file
      writer - the writer to write the model to
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier)
      Write the Model to the Writer using the provided Path as a reference
      Parameters:
      model - the model to write
      pom - the path to the POM file
      writerSupplier - the writer supplier to write the model to
    • writeModel

      public static void writeModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier, XMLFormat format)
      Write the Model to the Writer using the provided Path as a reference
      Parameters:
      model - the model to write
      pom - the path to the POM file
      writerSupplier - the writer supplier to write the model to