Package io.fabric8.maven
Class Maven
java.lang.Object
io.fabric8.maven.Maven
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.maven.model.ModelnewModel()Create a new MavenModelstatic org.apache.maven.model.ModelreadModel(InputStream inputStream) Read theInputStreamas aModelstatic org.apache.maven.model.ModelRead thePathas aModelstatic org.apache.maven.model.ModelA String version that makes it easier to be called from other languagesstatic org.apache.maven.model.ModelRead thePathas aModelstatic voidwriteModel(org.apache.maven.model.Model model) Shortcut to writeModel(model,model.getPomFile().toPath());static voidwriteModel(org.apache.maven.model.Model model, Writer writer) Shortcut to writeModel(model,model.getPomFile().toPath(),writer);static voidwriteModel(org.apache.maven.model.Model model, Writer writer, XMLFormat format) Shortcut to writeModel(model,model.getPomFile().toPath(),writer, format);static voidwriteModel(org.apache.maven.model.Model model, Path pom) Write the Model back to the providedPathstatic voidwriteModel(org.apache.maven.model.Model model, Path pom, XMLFormat format) static voidwriteModel(org.apache.maven.model.Model model, Path pom, Writer writer) static voidwriteModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier) static voidwriteModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier, XMLFormat format)
-
Method Details
-
newModel
public static org.apache.maven.model.Model newModel()Create a new MavenModel- Returns:
- a new
Model
-
readModel
A String version that makes it easier to be called from other languages- See Also:
-
readModel
-
readModel
-
readModel
Read theInputStreamas aModel- Parameters:
inputStream- an input stream of a pom.xml file- Returns:
- the maven
Model
-
writeModel
public static void writeModel(org.apache.maven.model.Model model) Shortcut to writeModel(model,model.getPomFile().toPath());- Parameters:
model- the model to write
-
writeModel
-
writeModel
-
writeModel
Shortcut to writeModel(model,model.getPomFile().toPath(),writer);- Parameters:
model- the model to writewriter- the writer to write the model to
-
writeModel
-
writeModel
-
writeModel
-
writeModel
-