fix stray Ivy logging message when directly accessing IvySbt#Module

This commit is contained in:
Mark Harrah 2011-02-11 20:09:42 -05:00
parent 1124cc59d9
commit 032f638549
2 changed files with 6 additions and 4 deletions

View File

@ -91,10 +91,12 @@ final class IvySbt(val configuration: IvyConfiguration)
def owner = IvySbt.this
def logger = configuration.log
def withModule[T](f: (Ivy,DefaultModuleDescriptor,String) => T): T =
withIvy[T] { ivy => f(ivy, moduleDescriptor, defaultConfig) }
withIvy[T] { ivy => f(ivy, moduleDescriptor0, defaultConfig0) }
def moduleDescriptor = IvySbt.synchronized { moduleDescriptor0 }
def defaultConfig = IvySbt.synchronized { defaultConfig0 }
def moduleDescriptor = withModule((_,md,_) => md)
def defaultConfig = withModule( (_,_,dc) => dc)
// these should only be referenced by withModule because lazy vals synchronize on this object
// withIvy explicitly locks the IvySbt object, so they have to be done in the right order to avoid deadlock
private[this] lazy val (moduleDescriptor0: DefaultModuleDescriptor, defaultConfig0: String) =
{
val (baseModule, baseConfiguration) =

View File

@ -356,7 +356,7 @@ object Artifact
val name = file.getName
val i = name.lastIndexOf('.')
val base = if(i >= 0) name.substring(0, i) else name
Artifact(name, extract(name, defaultType), extract(name, defaultExtension), None, Nil, Some(file.toURI.toURL))
Artifact(base, extract(name, defaultType), extract(name, defaultExtension), None, Nil, Some(file.toURI.toURL))
}
}
final case class ModuleConfiguration(organization: String, name: String, revision: String, resolver: Resolver)