From bd792c3bb829094bb6d83e311effd2f479513bba Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 30 Dec 2015 04:46:20 -0500 Subject: [PATCH] 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. --- .../librarymanagement/ivyint/SbtChainResolver.scala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/librarymanagement/src/main/scala/sbt/internal/librarymanagement/ivyint/SbtChainResolver.scala b/librarymanagement/src/main/scala/sbt/internal/librarymanagement/ivyint/SbtChainResolver.scala index c325d4af3..e621ac7a0 100644 --- a/librarymanagement/src/main/scala/sbt/internal/librarymanagement/ivyint/SbtChainResolver.scala +++ b/librarymanagement/src/main/scala/sbt/internal/librarymanagement/ivyint/SbtChainResolver.scala @@ -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 }