From d295ab3a183ca9feeb3213ca088587fb825bfe82 Mon Sep 17 00:00:00 2001 From: Britton Isbell Date: Fri, 12 Sep 2008 10:01:06 +0000 Subject: [PATCH] Previously removed MavenProject.writeModel, but found a plugin using this method. Added it back in. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@694669 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/project/MavenProject.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java index 57c2e876dd..9cf9a2cce8 100644 --- a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java +++ b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java @@ -54,6 +54,7 @@ import org.apache.maven.model.ReportSet; import org.apache.maven.model.Reporting; import org.apache.maven.model.Resource; import org.apache.maven.model.Scm; +import org.apache.maven.model.io.xpp3.MavenXpp3Writer; import org.apache.maven.project.artifact.ActiveProjectArtifact; import org.apache.maven.project.artifact.InvalidDependencyVersionException; import org.apache.maven.project.artifact.MavenMetadataSource; @@ -62,6 +63,7 @@ import org.codehaus.plexus.util.xml.Xpp3Dom; import java.io.File; import java.io.IOException; +import java.io.Writer; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -1843,6 +1845,14 @@ public class MavenProject return sb.toString(); } + public void writeModel( Writer writer ) + throws IOException + { + MavenXpp3Writer pomWriter = new MavenXpp3Writer(); + pomWriter.write( writer, getModel() ); + } + + /** * @throws CloneNotSupportedException * @since 2.0.9