This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-management.git


The following commit(s) were added to refs/heads/main by this push:
     new b4b9c688 fix nightly build tests (#139)
b4b9c688 is described below

commit b4b9c688af16abfaea1e009fc3bdb9ef5eea59ce
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Nov 13 14:09:20 2023 +0100

    fix nightly build tests (#139)
---
 build.sbt                     | 64 ++++++++++++++++++++++++++-----------------
 project/Common.scala          |  2 ++
 project/Dependencies.scala    |  2 +-
 project/PekkoDependency.scala |  4 ++-
 4 files changed, 45 insertions(+), 27 deletions(-)

diff --git a/build.sbt b/build.sbt
index bccf0002..66026ec4 100644
--- a/build.sbt
+++ b/build.sbt
@@ -32,36 +32,50 @@ inThisBuild(Def.settings(
     (Global / onLoad).value
   }))
 
+val logLevelProjectList: Seq[ProjectReference] = {
+  if (System.getProperty(PekkoDependency.pekkoBuildVersionPropertyName) == 
"main") {
+    Seq.empty
+  } else {
+    Seq[ProjectReference](managementLoglevelsLogback)
+  }
+} ++ {
+  if (System.getProperty(PekkoDependency.pekkoBuildVersionPropertyName) == 
"main"
+    && !Common.testWithSlf4J2) {
+    Seq.empty
+  } else {
+    Seq[ProjectReference](managementLoglevelsLogback)
+  }
+} ++ Seq[ProjectReference](managementLoglevelsLog4j2Slf4j2)
+
+val projectList: Seq[ProjectReference] = Seq[ProjectReference](
+  // When this aggregate is updated the list of modules in 
ManifestInfo.checkSameVersion
+  // in management should also be updated
+  discoveryAwsApi,
+  discoveryAwsApiAsync,
+  discoveryConsul,
+  discoveryKubernetesApi,
+  discoveryMarathonApi,
+  management,
+  managementPki,
+  managementClusterHttp,
+  managementClusterBootstrap) ++ logLevelProjectList ++ Seq[ProjectReference](
+  integrationTestAwsApiEc2TagBased,
+  integrationTestLocal,
+  integrationTestAwsApiEcs,
+  integrationTestKubernetesApi,
+  integrationTestKubernetesApiJava,
+  integrationTestKubernetesDns,
+  integrationTestMarathonApiDocker,
+  leaseKubernetes,
+  leaseKubernetesIntTest,
+  docs)
+
 // root
 lazy val root = project
   .in(file("."))
   .enablePlugins(ScalaUnidocPlugin)
   .disablePlugins(MimaPlugin)
-  .aggregate(
-    // When this aggregate is updated the list of modules in 
ManifestInfo.checkSameVersion
-    // in management should also be updated
-    discoveryAwsApi,
-    discoveryAwsApiAsync,
-    discoveryConsul,
-    discoveryKubernetesApi,
-    discoveryMarathonApi,
-    management,
-    managementPki,
-    managementClusterHttp,
-    managementClusterBootstrap,
-    managementLoglevelsLogback,
-    managementLoglevelsLog4j2,
-    managementLoglevelsLog4j2Slf4j2,
-    integrationTestAwsApiEc2TagBased,
-    integrationTestLocal,
-    integrationTestAwsApiEcs,
-    integrationTestKubernetesApi,
-    integrationTestKubernetesApiJava,
-    integrationTestKubernetesDns,
-    integrationTestMarathonApiDocker,
-    leaseKubernetes,
-    leaseKubernetesIntTest,
-    docs)
+  .aggregate(projectList: _*)
   .settings(
     name := "pekko-management-root",
     GlobalScope / parallelExecution := false)
diff --git a/project/Common.scala b/project/Common.scala
index 5431cd4d..fe00c883 100644
--- a/project/Common.scala
+++ b/project/Common.scala
@@ -96,6 +96,8 @@ object Common extends AutoPlugin {
   override lazy val buildSettings = Seq(
     dynverSonatypeSnapshots := true)
 
+  val testWithSlf4J2: Boolean = 
java.lang.Boolean.getBoolean("pekko.test.slf4j2")
+
   private def isJdk8 =
     
VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(s"=1.8"))
 }
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index e01291e3..8bcd6cef 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -110,7 +110,7 @@ object Dependencies {
     "org.apache.pekko" %% "pekko-testkit" % pekkoVersion % Test,
     "org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % Test)
 
-  val managementLoglevelsLogbackSlf4j2Overrides = if 
(java.lang.Boolean.getBoolean("pekko.test.slf4j2")) {
+  val managementLoglevelsLogbackSlf4j2Overrides = if (Common.testWithSlf4J2) {
     Seq(
       "org.slf4j" % "slf4j-api" % "2.0.9",
       "ch.qos.logback" % "logback-classic" % "1.3.11" % Test)
diff --git a/project/PekkoDependency.scala b/project/PekkoDependency.scala
index c95c586d..23b855c6 100644
--- a/project/PekkoDependency.scala
+++ b/project/PekkoDependency.scala
@@ -18,6 +18,8 @@ import scala.util.matching.Regex.Groups
 
 object PekkoDependency {
 
+  val pekkoBuildVersionPropertyName = "pekko.build.pekko.version"
+
   sealed trait Pekko {
     def version: String
     // The version to use in api/japi/docs links,
@@ -36,7 +38,7 @@ object PekkoDependency {
       case Some(pekkoSources) =>
         Sources(pekkoSources)
       case None =>
-        Option(System.getProperty("pekko.build.pekko.version")) match {
+        Option(System.getProperty(pekkoBuildVersionPropertyName)) match {
           case Some("main")           => mainSnapshot
           case Some("default") | None => Artifact(defaultVersion)
           case Some(other)            => Artifact(other, true)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to