mirror of
https://github.com/sbt/sbt.git
synced 2026-08-22 06:07:24 +02:00
Allow for non default classifiers to be given a try from Maven repositories
TODO Add test with the standalone classifier on coursier-cli once coursier 1.0.0-M8 is released
This commit is contained in:
@@ -79,10 +79,23 @@ case class MavenSource(
|
|||||||
overrideClassifiers match {
|
overrideClassifiers match {
|
||||||
case Some(classifiers) =>
|
case Some(classifiers) =>
|
||||||
val classifiersSet = classifiers.toSet
|
val classifiersSet = classifiers.toSet
|
||||||
project.publications.collect {
|
val publications = project.publications.collect {
|
||||||
case (_, p) if classifiersSet(p.classifier) =>
|
case (_, p) if classifiersSet(p.classifier) =>
|
||||||
artifactOf(dependency.module, p)
|
p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val publications0 =
|
||||||
|
if (publications.isEmpty)
|
||||||
|
classifiers.map { classifier =>
|
||||||
|
Publication(dependency.module.name, "jar", "jar", classifier)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
publications
|
||||||
|
|
||||||
|
publications0.map { p =>
|
||||||
|
artifactOf(dependency.module, p)
|
||||||
|
}
|
||||||
|
|
||||||
case None =>
|
case None =>
|
||||||
Seq(
|
Seq(
|
||||||
artifactOf(
|
artifactOf(
|
||||||
|
|||||||
Reference in New Issue
Block a user