Class POMOperator
java.lang.Object
io.codemodder.plugins.maven.operator.POMOperator
Facade for the POM Operator, providing methods for modifying and querying POM files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDependency
(io.codemodder.DependencyGAV newDependencyGAV) Modifies and retrieves the ProjectModel with a new dependency.@NotNull Collection<io.codemodder.DependencyGAV>
Retrieves all found dependencies in the POM.io.codemodder.plugins.maven.operator.POMScanner
-
Constructor Details
-
POMOperator
-
-
Method Details
-
getPomScanner
public io.codemodder.plugins.maven.operator.POMScanner getPomScanner() -
addDependency
public ProjectModel addDependency(io.codemodder.DependencyGAV newDependencyGAV) throws XMLStreamException, URISyntaxException, IOException, org.dom4j.DocumentException Modifies and retrieves the ProjectModel with a new dependency.- Parameters:
newDependencyGAV
- The new DependencyGAV to add to the POM.- Returns:
- The modified ProjectModel, or null if the modification was unsuccessful.
- Throws:
XMLStreamException
- If an error occurs during XML stream processing.URISyntaxException
- If there is an issue with the URI syntax.IOException
- If an I/O error occurs.org.dom4j.DocumentException
- If an error occurs while parsing the document.
-
getAllFoundDependencies
@NotNull public @NotNull Collection<io.codemodder.DependencyGAV> getAllFoundDependencies() throws org.dom4j.DocumentException, IOException, URISyntaxException, XMLStreamExceptionRetrieves all found dependencies in the POM.- Returns:
- A collection of DependencyGAV objects representing the found dependencies.
- Throws:
org.dom4j.DocumentException
- If an error occurs while parsing the document.IOException
- If an I/O error occurs.URISyntaxException
- If there is an issue with the URI syntax.XMLStreamException
- If an error occurs during XML stream processing.
-