always use 'jar' as packaging type if there is an artifact with a 'jar' type

This commit is contained in:
Mark Harrah 2011-01-04 11:10:31 -05:00
parent 260ee59d4a
commit 9e045edab8
1 changed files with 3 additions and 2 deletions

View File

@ -77,8 +77,9 @@ class MakePom
case Array() => "pom"
case Array(x) => x.getType
case xs =>
val notpom = xs.filter(_.getType != "pom")
if(notpom.isEmpty) "pom" else notpom(0).getType
val types = xs.map(_.getType)
val notpom = types.toList - "pom"
if(notpom.isEmpty) "pom" else if(notpom contains "jar") "jar" else notpom.head
}
def makeDependencies(module: ModuleDescriptor, configurations: Option[Iterable[Configuration]]): NodeSeq =