Skip to content

Commit

Permalink
Merge pull request #367 from vigdorchik/363_validate_resolvers
Browse files Browse the repository at this point in the history
363 validate resolvers
  • Loading branch information
harrah committed Feb 12, 2012
2 parents baaf75b + 7cf1e3f commit 13bcdf4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main/Defaults.scala
Expand Up @@ -801,6 +801,11 @@ object Classpaths
CrossVersion(scalaVersion, binVersion)(base).copy(crossVersion = CrossVersion.Disabled)
}
)
def warnResolversConflict(ress: Seq[Resolver], log: Logger) {
for ((name, r) <- ress groupBy (_.name) if r.size > 1) {
log.warn("Multiple resolvers configured with the name '" + name + "'. Rename to avoid conflict.")
}
}
def pluginProjectID: Initialize[ModuleID] = (sbtVersion in update, sbtBinaryVersion in update, scalaVersion in update, scalaBinaryVersion in update, projectID, sbtPlugin) {
(sbtV, sbtBV, scalaV, scalaBV, pid, isPlugin) =>
if(isPlugin)
Expand Down Expand Up @@ -964,6 +969,7 @@ object Classpaths
(thisProjectRef, configuration, settings, buildDependencies) flatMap unmanagedDependencies0
def mkIvyConfiguration: Initialize[Task[IvyConfiguration]] =
(fullResolvers, ivyPaths, otherResolvers, moduleConfigurations, offline, checksums in update, appConfiguration, streams) map { (rs, paths, other, moduleConfs, off, check, app, s) =>
warnResolversConflict(rs ++: other, s.log)
new InlineIvyConfiguration(paths, rs, other, moduleConfs, off, Some(lock(app)), check, s.log)
}

Expand Down

0 comments on commit 13bcdf4

Please sign in to comment.