more 2.8 updates, launcher compiles and runs with 2.8

This commit is contained in:
Mark Harrah 2010-06-15 20:38:18 -04:00
parent 3d7051ad07
commit f56c0ac37f
4 changed files with 7 additions and 15 deletions

View File

@ -25,7 +25,7 @@ class ComponentManager(globalLock: xsbti.GlobalLock, provider: xsbti.ComponentPr
try { update(id); getOrElse(createAndCache) }
catch { case e: NotInCache => createAndCache }
}
def getOrElse(orElse: => Iterable[File]) =
def getOrElse(orElse: => Iterable[File]): Iterable[File] =
{
val existing = provider.component(id)
if(existing.isEmpty) orElse else existing

View File

@ -14,10 +14,10 @@ import plugins.repository.Resource
import plugins.repository.url.URLResource
/** Subclasses the default Ivy file parser in order to provide access to protected methods.*/
private[sbt] object CustomXmlParser extends XmlModuleDescriptorParser with NotNull
private[sbt] object CustomXmlParser extends XmlModuleDescriptorParser
{
import XmlModuleDescriptorParser.Parser
class CustomParser(settings: IvySettings, defaultConfig: Option[String]) extends Parser(CustomXmlParser, settings) with NotNull
class CustomParser(settings: IvySettings, defaultConfig: Option[String]) extends Parser(CustomXmlParser, settings)
{
if(defaultConfig.isDefined) setDefaultConfMapping("*->default(compile)")

View File

@ -257,13 +257,7 @@ private object IvySbt
javaMap(ea.extraAttributes)
}
private def javaMap(map: Map[String,String]) =
if(map.isEmpty) null
else
{
val wrap = scala.collection.jcl.Map(new java.util.HashMap[String,String])
wrap ++= map
wrap.underlying
}
if(map.isEmpty) null else scala.collection.JavaConversions.asMap(map)
private object javaMap
{
@ -337,7 +331,7 @@ private object IvySbt
lazy val allConfigurations = moduleID.getPublicConfigurationsNames
for(artifact <- artifacts)
{
val configurationStrings =
val configurationStrings: Iterable[String] =
{
val artifactConfigurations = artifact.configurations
if(artifactConfigurations.isEmpty)

View File

@ -60,8 +60,6 @@ object IvyActions
}
/** Creates a Maven pom from the given Ivy configuration*/
@deprecated def makePom(module: IvySbt#Module, extraDependencies: Iterable[ModuleID], configurations: Option[Iterable[Configuration]], extra: NodeSeq, output: File): Unit =
makePom(module, MakePomConfiguration(extraDependencies, configurations, extra), output)
def makePom(module: IvySbt#Module, configuration: MakePomConfiguration, output: File)
{
import configuration.{configurations, extra, extraDependencies, filterRepositories, process}
@ -127,7 +125,7 @@ object IvyActions
resolveOptions.setLog(ivyLogLevel(logging))
val resolveReport = ivy.resolve(module, resolveOptions)
if(resolveReport.hasError)
throw new ResolveException(resolveReport.getAllProblemMessages.toArray.map(_.toString).toList.removeDuplicates)
throw new ResolveException(resolveReport.getAllProblemMessages.toArray.map(_.toString).distinct)
}
import UpdateLogging.{Quiet, Full, DownloadOnly}
@ -140,4 +138,4 @@ object IvyActions
case Full => LOG_DEFAULT
}
}
final class ResolveException(messages: List[String]) extends RuntimeException(messages.mkString("\n"))
final class ResolveException(messages: Seq[String]) extends RuntimeException(messages.mkString("\n"))