From 92201e4ab3daaeeaf0d8296cfdda94c8602ec12e Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Tue, 12 Jul 2011 07:47:31 -0400 Subject: [PATCH] use \n for make-pom because PrettyPrinter hard codes it. fixes #95 --- ivy/MakePom.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ivy/MakePom.scala b/ivy/MakePom.scala index 9a20e11e5..432a83ba6 100644 --- a/ivy/MakePom.scala +++ b/ivy/MakePom.scala @@ -22,15 +22,15 @@ class MakePom def encoding = "UTF-8" def write(ivy: Ivy, module: ModuleDescriptor, configurations: Option[Iterable[Configuration]], extra: NodeSeq, process: XNode => XNode, filterRepositories: MavenRepository => Boolean, allRepositories: Boolean, output: File): Unit = write(process(toPom(ivy, module, configurations, extra, filterRepositories, allRepositories)), output) - def write(node: XNode, output: File): Unit = write(toString(node), output) - def write(xmlString: String, output: File) + // use \n as newline because toString uses PrettyPrinter, which hard codes line endings to be \n + def write(node: XNode, output: File): Unit = write(toString(node), output, "\n") + def write(xmlString: String, output: File, newline: String) { output.getParentFile.mkdirs() val out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(output), encoding)) try { - out.write("") - out.newLine() + out.write("" + newline) out.write(xmlString) } finally { out.close() }