o Fixed encoding error

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@749308 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-03-02 13:46:51 +00:00
parent 494b72ea2c
commit 87f3f584aa
1 changed files with 7 additions and 3 deletions

View File

@ -419,9 +419,13 @@ public class DefaultMavenProjectBuilder
List<ModelProperty> p;
try
{
p = ModelMarshaller.marshallXmlToModelProperties(new ByteArrayInputStream(writer.getBuffer().toString().getBytes()),
ProjectUri.Profiles.xUri, uris);
} catch (IOException e) {
String xml = writer.getBuffer().toString();
p =
ModelMarshaller.marshallXmlToModelProperties( new ByteArrayInputStream( xml.getBytes( "UTF-8" ) ),
ProjectUri.Profiles.xUri, uris );
}
catch ( IOException e )
{
return null;
}