From ae0b9457b2d9ca9d3116c09dc695c263c987ece4 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Thu, 11 Jul 2013 18:49:30 -0400 Subject: [PATCH] Revert packaging='pom' behavior change introduced in c5823ad1e7b6ad9d2b79. Fixes #810. Ref #636. --- ivy/src/main/scala/sbt/Ivy.scala | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ivy/src/main/scala/sbt/Ivy.scala b/ivy/src/main/scala/sbt/Ivy.scala index 7b253408a..852103195 100644 --- a/ivy/src/main/scala/sbt/Ivy.scala +++ b/ivy/src/main/scala/sbt/Ivy.scala @@ -245,14 +245,17 @@ private object IvySbt // Technically, this should be applied to module configurations. // That would require custom subclasses of all resolver types in ConvertResolver (a delegation approach does not work). // It would be better to get proper support into Ivy. + // A workaround is to configure the ModuleConfiguration resolver to be a ChainResolver. // // This method is only used by the pom parsing code in Ivy to find artifacts it doesn't know about. // In particular, a) it looks up source and javadoc classifiers b) it looks up a main artifact for packaging="pom" // sbt now provides the update-classifiers or requires explicitly specifying classifiers explicitly - // Providing a main artifact for packaging="pom" does not seem to be correct and the lookup can be expensive, so - // sbt now requires this artifact to be explicitly declared. - override def locate(artifact: IArtifact) = null -// if(hasImplicitClassifier(artifact)) null else super.locate(artifact) + // Providing a main artifact for packaging="pom" does not seem to be correct and the lookup can be expensive. + // + // Ideally this could just skip the lookup, but unfortunately several artifacts in practice do not follow the + // correct behavior for packaging="pom" and so it is only skipped for source/javadoc classifiers. + override def locate(artifact: IArtifact) = if(hasImplicitClassifier(artifact)) null else super.locate(artifact) + override def getDependency(dd: DependencyDescriptor, data: ResolveData) = { if(data.getOptions.getLog != LogOptions.LOG_QUIET)