Package io.fabric8.maven
Class Maven
java.lang.Object
io.fabric8.maven.Maven
- Author:
- George Gastaldi
-
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
Read thePathas aModel- Parameters:
pom- a path to a pom.xml file- Returns:
- the maven
Model
-
readModel
Read thePathas aModel- Parameters:
rdr- a Reader on the contents of a pom file- Returns:
- the maven
Model
-
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
Write the Model back to the providedPath- Parameters:
model- the model to writepom- the path to the POM file
-
writeModel
- Parameters:
model- the model to writepom- the path to the POM fileformat- the XML format to use
-
writeModel
Shortcut to writeModel(model,model.getPomFile().toPath(),writer);- Parameters:
model- the model to writewriter- the writer to write the model to
-
writeModel
Shortcut to writeModel(model,model.getPomFile().toPath(),writer, format);- Parameters:
model- the model to writewriter- the writer to write the model toformat- the XML format to use
-
writeModel
- Parameters:
model- the model to writepom- the path to the POM filewriter- the writer to write the model to
-
writeModel
public static void writeModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier) - Parameters:
model- the model to writepom- the path to the POM filewriterSupplier- the writer supplier to write the model to
-
writeModel
public static void writeModel(org.apache.maven.model.Model model, Path pom, Supplier<Writer> writerSupplier, XMLFormat format) - Parameters:
model- the model to writepom- the path to the POM filewriterSupplier- the writer supplier to write the model to
-