Skip to content

Commit

Permalink
#51: adding merge strategy during assembly operation
Browse files Browse the repository at this point in the history
  • Loading branch information
lsulak committed Sep 14, 2023
1 parent e5af694 commit eac305e
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,19 @@ lazy val commonSettings = Seq(
Test / parallelExecution := false
)

val mergeStrategy: Def.SettingsDefinition = assemblyMergeStrategy / assembly := {
case PathList("META-INF", _) => MergeStrategy.discard
case "application.conf" => MergeStrategy.concat
case "reference.conf" => MergeStrategy.concat
case _ => MergeStrategy.first
}

lazy val parent = (project in file("."))
.aggregate(atumServer.projectRefs ++ atumAgent.projectRefs: _*)
.settings(
name := "atum-service-parent",
publish / skip := true
publish / skip := true,
mergeStrategy
)

lazy val atumAgent = (projectMatrix in file("agent"))
Expand All @@ -60,7 +68,8 @@ lazy val atumAgent = (projectMatrix in file("agent"))
name := "atum-agent",
(Compile / compile) := ((Compile / compile) dependsOn printScalaVersion).value,
scalafmtOnCompile := true
)
),
mergeStrategy
)
.enablePlugins(ScalafmtPlugin)
.sparkRow(SparkVersionAxis(spark2), scalaVersions = Seq(scala211, scala212))
Expand All @@ -76,7 +85,8 @@ lazy val atumServer = (projectMatrix in file("server"))
packageBin := (Compile / assembly).value,
artifactPath / (Compile / packageBin) := baseDirectory.value / s"target/${name.value}-${version.value}.war",
webappWebInfClasses := true,
inheritJarManifest := true
inheritJarManifest := true,
mergeStrategy
): _*
)
.settings(
Expand Down

0 comments on commit eac305e

Please sign in to comment.