Skip to content

Commit

Permalink
Fix #158 - The wrong named parameter (i.e. artifact) was used in Ex…
Browse files Browse the repository at this point in the history
…clusionRule - replaced with `name`
  • Loading branch information
kevin-lee committed Dec 21, 2020
1 parent d83add8 commit 60870c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/maven2sbt/core/Exclusion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object Exclusion {
case Exclusion(groupId, artifactId) =>
val groupIdStr = MavenProperty.toPropertyNameOrItself(propsName, groupId.groupId)
val artifactIdStr = MavenProperty.toPropertyNameOrItself(propsName, artifactId.artifactId)
s"""ExclusionRule(organization = $groupIdStr, artifact = $artifactIdStr)"""
s"""ExclusionRule(organization = $groupIdStr, name = $artifactIdStr)"""
}

def renderExclusions(propsName: Props.PropsName, exclusions: Seq[Exclusion]): String = exclusions match {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/maven2sbt/core/ExclusionSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object ExclusionSpec extends Properties {
def testRenderExclusionRule: Property = for {
exclusion <- Gens.genExclusion.log("exclusion")
} yield {
val expected = s"""ExclusionRule(organization = "${exclusion.groupId.groupId}", artifact = "${exclusion.artifactId.artifactId}")"""
val expected = s"""ExclusionRule(organization = "${exclusion.groupId.groupId}", name = "${exclusion.artifactId.artifactId}")"""
val actual = Exclusion.renderExclusionRule(propsName, exclusion)
actual ==== expected
}
Expand Down

0 comments on commit 60870c5

Please sign in to comment.