Class PomUtils

java.lang.Object
com.sap.cds.maven.plugin.util.PomUtils

public class PomUtils extends Object
A utility class to manipulate pom.xml files.
  • Method Details

    • addCdsCommand

      public static boolean addCdsCommand(Document doc, String command)
    • addDependency

      public static boolean addDependency(Document doc, String groupId, String artifactId, String version, String scope)
      Adds a dependency to given pom.xml DOM if it doesn't exist yet.
      Parameters:
      doc - the pom.xml DOM
      groupId - the dependency's groupId
      artifactId - the dependency's artifactId
      version - the dependency's version
      Returns:
      true if dependency was added
    • addModule

      public static boolean addModule(Document doc, String module)
      Adds a module to given pom.xml DOM if it doesn't exist yet.
      Parameters:
      doc - the pom.xml Document node
      module - the module to add
      Returns:
      true if module was added