mirror of https://github.com/apache/maven.git
o applying patch to allow to read the model with a reader
Submitted by: Eugene Kuleshov git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@581732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b3461d5936
commit
5d2c433ba9
|
@ -206,22 +206,24 @@ public class MavenEmbedder
|
|||
}
|
||||
|
||||
public Model readModel( File file )
|
||||
throws XmlPullParserException, IOException
|
||||
throws XmlPullParserException, IOException
|
||||
{
|
||||
Reader reader = new FileReader( file );
|
||||
Reader reader = new FileReader( file );
|
||||
|
||||
try
|
||||
{
|
||||
return readModel( reader );
|
||||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( reader );
|
||||
}
|
||||
}
|
||||
|
||||
Model model;
|
||||
|
||||
try
|
||||
{
|
||||
model = modelReader.read( reader );
|
||||
}
|
||||
finally
|
||||
{
|
||||
IOUtil.close( reader );
|
||||
}
|
||||
|
||||
return model;
|
||||
public Model readModel( Reader reader )
|
||||
throws XmlPullParserException, IOException
|
||||
{
|
||||
return modelReader.read( reader );
|
||||
}
|
||||
|
||||
public void writeModel( Writer writer,
|
||||
|
|
Loading…
Reference in New Issue