mirror of https://github.com/sbt/sbt.git
yet another 2.8 compatibility hack
git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@932 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
parent
91d05d74c8
commit
fb64501c9b
|
|
@ -211,7 +211,15 @@ private object WebstartScalaProject
|
|||
/** Writes the XML string 'xmlString' to the file 'outputPath' if the hashes are different.*/
|
||||
private def writeXML(xml: Elem, outputPath: Path, log: Logger): Option[String] =
|
||||
{
|
||||
val xmlString = scala.xml.Utility.toXML(xml, false)
|
||||
val xmlString =
|
||||
{
|
||||
import scala.xml.Utility
|
||||
implicit def another28Hack(any: AnyRef): { def toXML(xml: Elem, stripComments: Boolean): String } =
|
||||
new {
|
||||
def toXML(xml: Elem, stripComments: Boolean) = Utility.toXML(xml).toString // this will only be called for 2.8, which defaults to stripComments= false, unlike 2.7
|
||||
}
|
||||
scala.xml.Utility.toXML(xml, false) // 2.8 doesn't have this method anymore, so the above implicit will kick in for 2.8 only
|
||||
}
|
||||
if(!outputPath.exists)
|
||||
{
|
||||
log.debug("JNLP file did not exist, writing inline XML to " + outputPath)
|
||||
|
|
|
|||
Loading…
Reference in New Issue