o Decoupled embedder from XPP3

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@779311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-27 20:59:12 +00:00
parent 0e34f1958a
commit 6bbe3780d4
1 changed files with 9 additions and 9 deletions

View File

@ -36,8 +36,8 @@ import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenExecutionResult;
import org.apache.maven.lifecycle.LifecycleExecutor;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
import org.apache.maven.model.io.ModelReader;
import org.apache.maven.model.io.ModelWriter;
import org.apache.maven.plugin.PluginManager;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
@ -101,9 +101,9 @@ public class MavenEmbedder
private MavenProjectBuilder mavenProjectBuilder;
private MavenXpp3Reader modelReader;
private ModelReader modelReader;
private MavenXpp3Writer modelWriter;
private ModelWriter modelWriter;
private MavenExecutionRequestPopulator populator;
@ -189,20 +189,20 @@ public class MavenEmbedder
public Model readModel( Reader reader )
throws XmlPullParserException, IOException
{
return modelReader.read( reader );
return modelReader.read( reader, null );
}
public void writeModel( Writer writer, Model model, boolean namespaceDeclaration )
throws IOException
{
modelWriter.write( writer, model );
modelWriter.write( writer, null, model );
}
public void writeModel( Writer writer,
Model model )
throws IOException
{
modelWriter.write( writer, model );
modelWriter.write( writer, null, model );
}
// ----------------------------------------------------------------------
@ -392,9 +392,9 @@ public class MavenEmbedder
// client interface.
// ----------------------------------------------------------------------
modelReader = new MavenXpp3Reader();
modelReader = container.lookup( ModelReader.class );
modelWriter = new MavenXpp3Writer();
modelWriter = container.lookup( ModelWriter.class );
maven = container.lookup( Maven.class );