Skip to content

Commit

Permalink
Loader: exclude unnecessary hadoop dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
spenes committed Sep 6, 2023
1 parent 4cba713 commit 32af2b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ lazy val commonTransformerStream = project
.settings(BuildSettings.commonStreamTransformerBuildSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.commonStreamTransformerDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(common % "compile->compile;test->test")
.enablePlugins(BuildInfoPlugin)

lazy val loader = project
.in(file("modules/loader"))
.settings(BuildSettings.loaderBuildSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.loaderDependencies)
.dependsOn(
Expand All @@ -88,6 +89,7 @@ lazy val redshiftLoader = project
.in(file("modules/redshift-loader"))
.settings(BuildSettings.redshiftBuildSettings)
.settings(BuildSettings.additionalDockerSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.redshiftDependencies)
.dependsOn(loader % "compile->compile;test->test;runtime->runtime")
Expand All @@ -98,6 +100,7 @@ lazy val redshiftLoaderDistroless = project
.settings(sourceDirectory := (redshiftLoader / sourceDirectory).value)
.settings(BuildSettings.redshiftBuildSettings)
.settings(BuildSettings.additionalDockerSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.redshiftDependencies)
.dependsOn(loader % "compile->compile;test->test;runtime->runtime")
Expand All @@ -107,6 +110,7 @@ lazy val snowflakeLoader = project
.in(file("modules/snowflake-loader"))
.settings(BuildSettings.snowflakeBuildSettings)
.settings(BuildSettings.additionalDockerSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.snowflakeDependencies)
.dependsOn(common % "compile->compile;test->test",loader % "compile->compile;test->test;runtime->runtime")
Expand All @@ -117,6 +121,7 @@ lazy val snowflakeLoaderDistroless = project
.settings(sourceDirectory := (snowflakeLoader / sourceDirectory).value)
.settings(BuildSettings.snowflakeBuildSettings)
.settings(BuildSettings.additionalDockerSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.snowflakeDependencies)
.dependsOn(loader % "compile->compile;test->test;runtime->runtime")
Expand All @@ -126,6 +131,7 @@ lazy val databricksLoader = project
.in(file("modules/databricks-loader"))
.settings(BuildSettings.databricksBuildSettings)
.settings(BuildSettings.additionalDockerSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.dependsOn(loader % "compile->compile;test->test;runtime->runtime")
.enablePlugins(JavaAppPackaging, SnowplowDockerPlugin, BuildInfoPlugin)
Expand All @@ -135,6 +141,7 @@ lazy val databricksLoaderDistroless = project
.settings(sourceDirectory := (databricksLoader / sourceDirectory).value)
.settings(BuildSettings.databricksBuildSettings)
.settings(BuildSettings.additionalDockerSettings)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.dependsOn(loader % "compile->compile;test->test;runtime->runtime")
.enablePlugins(JavaAppPackaging, SnowplowDistrolessDockerPlugin, BuildInfoPlugin)
Expand All @@ -152,7 +159,7 @@ lazy val transformerKinesis = project
.settings(BuildSettings.additionalDockerSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.transformerKinesisDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(commonTransformerStream % "compile->compile;test->test;runtime->runtime", aws % "compile->compile;test->test;runtime->runtime")
.enablePlugins(JavaAppPackaging, SnowplowDockerPlugin, BuildInfoPlugin)

Expand All @@ -163,7 +170,7 @@ lazy val transformerKinesisDistroless = project
.settings(BuildSettings.additionalDockerSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.transformerKinesisDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(commonTransformerStream % "compile->compile;test->test;runtime->runtime", aws % "compile->compile;test->test;runtime->runtime")
.enablePlugins(JavaAppPackaging, SnowplowDistrolessDockerPlugin, BuildInfoPlugin)

Expand All @@ -173,7 +180,7 @@ lazy val transformerPubsub = project
.settings(BuildSettings.additionalDockerSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.transformerPubsubDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(commonTransformerStream % "compile->compile;test->test;runtime->runtime", gcp % "compile->compile;test->test")
.enablePlugins(JavaAppPackaging, SnowplowDockerPlugin, BuildInfoPlugin)

Expand All @@ -184,7 +191,7 @@ lazy val transformerPubsubDistroless = project
.settings(BuildSettings.additionalDockerSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.transformerPubsubDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(commonTransformerStream % "compile->compile;test->test;runtime->runtime", gcp % "compile->compile;test->test")
.enablePlugins(JavaAppPackaging, SnowplowDistrolessDockerPlugin, BuildInfoPlugin)

Expand All @@ -194,7 +201,7 @@ lazy val transformerKafka = project
.settings(BuildSettings.additionalDockerSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.transformerKafkaDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(commonTransformerStream % "compile->compile;test->test;runtime->runtime", azure % "compile->compile;test->test;runtime->runtime")
.enablePlugins(JavaAppPackaging, SnowplowDockerPlugin, BuildInfoPlugin)

Expand All @@ -206,6 +213,6 @@ lazy val transformerKafkaDistroless = project
.settings(BuildSettings.additionalDockerSettings)
.settings(addCompilerPlugin(Dependencies.betterMonadicFor))
.settings(libraryDependencies ++= Dependencies.transformerKafkaDependencies)
.settings(excludeDependencies ++= Dependencies.commonStreamTransformerExclusions)
.settings(excludeDependencies ++= Dependencies.commonExclusions)
.dependsOn(commonTransformerStream % "compile->compile;test->test;runtime->runtime", azure % "compile->compile;test->test")
.enablePlugins(JavaAppPackaging, SnowplowDistrolessDockerPlugin, BuildInfoPlugin)
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ object Dependencies {
eventGenerator
)

val commonStreamTransformerExclusions =
val commonExclusions =
Seq(
ExclusionRule(organization = "ch.qos.logback"),
ExclusionRule(organization = "org.apache.hadoop", name = "hadoop-yarn-api"),
Expand Down

0 comments on commit 32af2b0

Please sign in to comment.