Class PomUtils

java.lang.Object
io.quarkus.bom.decomposer.PomUtils

public class PomUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.maven.model.Model
    initModel(org.apache.maven.model.Model baseModel)
    Creates a new POM model initializing its base elements from the argument.
    static org.apache.maven.model.Model
    toModel(DecomposedBom decomposed)
    Converts decomposed BOM to a POM Model
    static org.apache.maven.model.Model
    toModel(DecomposedBom decomposed, org.apache.maven.model.Model baseModel)
    Converts decomposed BOM to a POM Model copying developer info, SCM, etc from the base Model
    static org.apache.maven.model.Dependency
    Creates a managed dependency that can be added to a BOM for a project dependency
    static void
    toPom(DecomposedBom decomposed, Path file)
    Persists decomposed BOM to a pom.xml file
    static void
    toPom(DecomposedBom decomposed, Path file, org.apache.maven.model.Model baseModel)
    Persists decomposed BOM to a pom.xml filling in developer, SCM and other info from the base model

    Methods inherited from class java.lang.Object

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

    • PomUtils

      public PomUtils()
  • Method Details

    • toModel

      public static org.apache.maven.model.Model toModel(DecomposedBom decomposed)
      Converts decomposed BOM to a POM Model
      Parameters:
      decomposed - decomposed BOM
      Returns:
      POM Model
    • toModel

      public static org.apache.maven.model.Model toModel(DecomposedBom decomposed, org.apache.maven.model.Model baseModel)
      Converts decomposed BOM to a POM Model copying developer info, SCM, etc from the base Model
      Parameters:
      decomposed - decomposed BOM
      baseModel - base Model info
      Returns:
      POM Model
    • initModel

      public static org.apache.maven.model.Model initModel(org.apache.maven.model.Model baseModel)
      Creates a new POM model initializing its base elements from the argument.
      Parameters:
      baseModel - base model
      Returns:
      new model initialized from the base model
    • toModelDep

      public static org.apache.maven.model.Dependency toModelDep(ProjectDependency dep)
      Creates a managed dependency that can be added to a BOM for a project dependency
      Parameters:
      dep - project dependency
      Returns:
      managed dependency
    • toPom

      public static void toPom(DecomposedBom decomposed, Path file) throws IOException
      Persists decomposed BOM to a pom.xml file
      Parameters:
      decomposed - decomposed BOM
      file - target file
      Throws:
      IOException - in case of a failure
    • toPom

      public static void toPom(DecomposedBom decomposed, Path file, org.apache.maven.model.Model baseModel) throws IOException
      Persists decomposed BOM to a pom.xml filling in developer, SCM and other info from the base model
      Parameters:
      decomposed - decomposed BOM
      file - target file
      baseModel - base model info
      Throws:
      IOException - in case of a failure