Class Maven


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.maven.model.Model readModel​(java.io.Reader rdr)
      Read the Path as a Model
      static org.apache.maven.model.Model readModel​(java.lang.String path)
      A String version that makes it easier to be called from other languages
      static org.apache.maven.model.Model readModel​(java.nio.file.Path pom)
      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, java.nio.file.Path pom)
      Write the Model back to the provided Path
      • Methods inherited from class java.lang.Object

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

      • readModel

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

        public static org.apache.maven.model.Model readModel​(java.nio.file.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​(java.io.Reader rdr)
        Read the Path as a Model
        Parameters:
        rdr - a Reader on the contents of a pom 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 -
      • writeModel

        public static void writeModel​(org.apache.maven.model.Model model,
                                      java.nio.file.Path pom)
        Write the Model back to the provided Path
        Parameters:
        model -
        pom -