mirror of https://github.com/sbt/sbt.git
Fixes #1616. Fixes the "latest snapshot" chain resolver
The "latest snapshot" chain resolver was assuming that there's at least one artifact per module. I think that was the root cause of #1616.
This commit is contained in:
parent
33ae444041
commit
bd792c3bb8
|
|
@ -193,15 +193,11 @@ private[sbt] case class SbtChainResolver(
|
|||
// Now that we know the real latest revision, let's force Ivy to use it
|
||||
val artifactOpt = findFirstArtifactRef(rmr.getDescriptor, dd, data, resolver)
|
||||
artifactOpt match {
|
||||
case None if resolver.getName == "inter-project" => // do nothing
|
||||
case None if resolver.isInstanceOf[CustomMavenResolver] =>
|
||||
// do nothing for now....
|
||||
// We want to see if the maven caching is sufficient and we do not need to duplicate within the ivy cache...
|
||||
case None => throw new RuntimeException(s"\t${resolver.getName}: no ivy file nor artifact found for $rmr")
|
||||
case Some(artifactRef) =>
|
||||
val systemMd = toSystem(rmr.getDescriptor)
|
||||
getRepositoryCacheManager.cacheModuleDescriptor(resolver, artifactRef,
|
||||
toSystem(dd), systemMd.getAllArtifacts.head, None.orNull, getCacheOptions(data))
|
||||
case None => // do nothing. There are modules without artifacts
|
||||
}
|
||||
rmr
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue