Don't unnecesarily mark some artifacts as optional

This commit is contained in:
Alexandre Archambault 2017-07-22 17:29:26 +02:00
parent bddf67cc17
commit ea8927d7b2
2 changed files with 2 additions and 1 deletions

View File

@ -251,7 +251,7 @@ final case class MavenSource(
else if (dependency.attributes.`type`.nonEmpty)
enrichedPublications.collect {
case p
if p.publication.classifier.isEmpty && (
if (p.publication.classifier.isEmpty || p.publication.classifier == MavenSource.typeDefaultClassifier(dependency.attributes.`type`)) && (
p.publication.`type` == dependency.attributes.`type` ||
(p.publication.ext == dependency.attributes.`type` && project.packagingOpt.toSeq.contains(p.publication.`type`)) // wow
) =>

View File

@ -569,6 +569,7 @@ abstract class CentralTests extends TestSuite {
val zookeeperTestArtifact = zookeeperTestArtifacts.head
assert(!isActualCentral || !zookeeperTestArtifact.isOptional)
assert(zookeeperTestArtifact.attributes.`type` == "test-jar")
assert(zookeeperTestArtifact.attributes.classifier == "tests")
zookeeperTestArtifact.url.endsWith("-tests.jar")