Class PomUtils
java.lang.Object
org.owasp.dependencycheck.xml.pom.PomUtils
- Author:
- jeremy long
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidanalyzePOM(Dependency dependency, File pomFile) Reads in the pom file and adds elements as evidence to the given dependency.static ModelReads in the specified POM and converts it to a Model.static ModelRetrieves the specified POM from a jar file and converts it to a Model.
-
Method Details
-
readPom
Reads in the specified POM and converts it to a Model.- Parameters:
file- the pom.xml file- Returns:
- returns an object representation of the POM
- Throws:
AnalysisException- is thrown if there is an exception extracting or parsing the POMModelobject
-
readPom
Retrieves the specified POM from a jar file and converts it to a Model.- Parameters:
path- the path to the pom.xml file within the jar filejar- the jar file to extract the pom from- Returns:
- returns an object representation of the POM
- Throws:
AnalysisException- is thrown if there is an exception extracting or parsing the POMModelobject
-
analyzePOM
Reads in the pom file and adds elements as evidence to the given dependency.- Parameters:
dependency- the dependency being analyzedpomFile- the pom file to read- Throws:
AnalysisException- is thrown if there is an exception parsing the pom
-