From 1f01635f2cf997f3f70c252ddae157c41dd9ec9c Mon Sep 17 00:00:00 2001 From: SteNicholas Date: Tue, 27 Aug 2024 15:00:52 +0800 Subject: [PATCH] [CELEBORN-1240][FOLLOWUP] Introduce web profile for web module ### What changes were proposed in this pull request? Introduce web profile for web module. ### Why are the changes needed? The compilation speed of web module is sometimes very slow due to the influence of the network, which hinders the development process. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? CI. Closes #2679 from SteNicholas/CELEBORN-1240. Authored-by: SteNicholas Signed-off-by: mingji (cherry picked from commit c0dda4a15aa988ba1dca9437573bb8aed8c1554c) --- pom.xml | 8 +++++++- project/CelebornBuild.scala | 23 ++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index febfb58134d..8858f0e35e7 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,6 @@ service master worker - web @@ -1634,6 +1633,13 @@ + + web + + web + + + google-mirror diff --git a/project/CelebornBuild.scala b/project/CelebornBuild.scala index f5fe2e08530..e5350706f3e 100644 --- a/project/CelebornBuild.scala +++ b/project/CelebornBuild.scala @@ -336,7 +336,7 @@ object CelebornBuild extends sbt.internal.BuildDef { CelebornClient.client, CelebornService.service, CelebornWorker.worker, - CelebornMaster.master) ++ maybeSparkClientModules ++ maybeFlinkClientModules ++ maybeMRClientModules + CelebornMaster.master) ++ maybeSparkClientModules ++ maybeFlinkClientModules ++ maybeMRClientModules ++ maybeWebModules } // ThisBuild / parallelExecution := false @@ -401,6 +401,15 @@ object Utils { lazy val maybeMRClientModules: Seq[Project] = mrClientProjects.map(_.modules).getOrElse(Seq.empty) + val WEB_VERSION = profiles.filter(_.startsWith("web")).headOption + + lazy val webProjects = WEB_VERSION match { + case Some("web") => Some(WebProjects) + case _ => None + } + + lazy val maybeWebModules: Seq[Project] = webProjects.map(_.modules).getOrElse(Seq.empty) + def defaultScalaVersion(): String = { // 1. Inherit the scala version of the spark project // 2. if the spark profile not specified, using the DEFAULT_SCALA_VERSION @@ -1236,3 +1245,15 @@ object MRClientProjects { } ) } + +object WebProjects { + + def web: Project = { + Project("celeborn-web", file("web")) + .settings(commonSettings) + } + + def modules: Seq[Project] = { + Seq(web) + } +}