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
This commit is contained in:
Britton Isbell 2008-09-12 10:01:06 +00:00
parent f2e9e6810a
commit d295ab3a18
1 changed files with 10 additions and 0 deletions

View File

@ -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