Package io.quarkus.maven.utilities
Class PomTransformer
java.lang.Object
io.quarkus.maven.utilities.PomTransformer
A utility to transform
pom.xml files on the DOM level while keeping the original comments and formatting also
on places where common javax.xml.transform.Transformer or javax.xml.parsers.DocumentBuilder based
solutions tend to fail, such as
- Order of XML declaration attributes
- Whitespace after the XML declaration
- Line breaks between element attributes
- File final whitespace
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceA transformation of a DOMstatic classA context of a set ofPomTransformer.Transformations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtransform(PomTransformer.Transformation... transformations) Loads the document underpath, applies the giventransformations, mitigates the formatting issues caused byTransformerand finally stores the document back to the file underpath.voidtransform(Collection<PomTransformer.Transformation> transformations) Loads the document underpath, applies the giventransformations, mitigates the formatting issues caused byTransformerand finally stores the document back to the file underpath.
-
Constructor Details
-
PomTransformer
-
-
Method Details
-
transform
Loads the document underpath, applies the giventransformations, mitigates the formatting issues caused byTransformerand finally stores the document back to the file underpath.- Parameters:
transformations- thePomTransformer.Transformations to apply
-
transform
Loads the document underpath, applies the giventransformations, mitigates the formatting issues caused byTransformerand finally stores the document back to the file underpath.- Parameters:
transformations- thePomTransformer.Transformations to apply
-