mirror of https://github.com/sbt/sbt.git
Fix NPE in ChainrResolver when there is no ivy file for a dependency.
This commit is contained in:
parent
7e100a0fe0
commit
8166c8aa5d
|
|
@ -98,10 +98,13 @@ class SbtChainResolver(name: String, resolvers: Seq[DependencyResolver], setting
|
||||||
case Right(Some((rmr, _))) =>
|
case Right(Some((rmr, _))) =>
|
||||||
rmr.getDescriptor.getPublicationDate match {
|
rmr.getDescriptor.getPublicationDate match {
|
||||||
case null =>
|
case null =>
|
||||||
val ivf = resolver.findIvyFileRef(dd, data)
|
(resolver.findIvyFileRef(dd, data), rmr.getDescriptor) match {
|
||||||
val lmd = new java.util.Date(ivf.getLastModified)
|
case (null, _) =>
|
||||||
rmr.getDescriptor match {
|
// In this instance, the dependency is specified by a direct URL or some other sort of "non-ivy" file
|
||||||
case dmd: DefaultModuleDescriptor =>
|
if (dd.isChanging)
|
||||||
|
Message.warn(s"Resolving a changing dependency (${rmr.getId}) with no ivy/pom file!, resolution order is undefined!")
|
||||||
|
case (ivf, dmd: DefaultModuleDescriptor) =>
|
||||||
|
val lmd = new java.util.Date(ivf.getLastModified)
|
||||||
Message.info(s"Getting null publication date from resolver: ${resolver} for ${rmr.getId}, setting to: ${lmd}")
|
Message.info(s"Getting null publication date from resolver: ${resolver} for ${rmr.getId}, setting to: ${lmd}")
|
||||||
dmd.setPublicationDate(lmd)
|
dmd.setPublicationDate(lmd)
|
||||||
case _ =>
|
case _ =>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue