Adjust mechanism of resolver conflict detection

Warn when publish resolver and dependency resolvers have same name but different access mechanism.
Multiple resolvers having same name as well as same access mechanism (i.e., equality matching) isn't
usually a problem. A common scenario for this would be Maven based resolvers with exact (http based)
same access mechanism. Also see #367, #363
This commit is contained in:
Indrajit Raychaudhuri 2012-03-12 05:14:52 +05:30
parent 3adf080bc1
commit eef3a1ed31
1 changed files with 3 additions and 2 deletions

View File

@ -841,8 +841,9 @@ object Classpaths
}
)
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 + "'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).")
val resset = ress.toSet
for ((name, r) <- resset groupBy (_.name) if r.size > 1) {
log.warn("Multiple resolvers having different access mechanism configured with same name '" + name + "'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).")
}
}
def pluginProjectID: Initialize[ModuleID] = (sbtVersion in update, sbtBinaryVersion in update, scalaVersion in update, scalaBinaryVersion in update, projectID, sbtPlugin) {