Package com.sap.cds.maven.plugin.util
Class PomUtils
java.lang.Object
com.sap.cds.maven.plugin.util.PomUtils
A utility class to manipulate pom.xml files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addCdsCommand
(Document doc, String command) static boolean
Adds a dependency to given pom.xml DOM if it doesn't exist yet.static boolean
Adds a module to given pom.xml DOM if it doesn't exist yet.
-
Method Details
-
addCdsCommand
-
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 DOMgroupId
- the dependency's groupIdartifactId
- the dependency's artifactIdversion
- the dependency's version- Returns:
true
if dependency was added
-
addModule
Adds a module to given pom.xml DOM if it doesn't exist yet.- Parameters:
doc
- the pom.xmlDocument
nodemodule
- the module to add- Returns:
true
if module was added
-