Revert "don't pick up tmpWs from a context"

This reverts commit 87c2c5f5735f13b7eec62f8cd0cf4fbbbb63dd88.

Revert "fix }"

This reverts commit 97e79eb867e8a731880e5c6c2e01f77505cffc3c.

Revert "introduce optional tmpWs for Windows to prevent long path failures"

This reverts commit f936616c399eb35d9e65f32d5ab7b24955b2fe91.
diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index 18257f8..ac3ce61 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -33,13 +33,12 @@
 
     // now determine the matrix of parallel builds
     def oses = params.containsKey('os') ? params.os : ['linux', 'windows']
-    // minimum, LTS, current and next ea
+	// minimum, LTS, current and next ea
     def jdks = params.containsKey('jdks') ? params.jdks : params.containsKey('jdk') ? params.jdk : ['7','8','11'] //['7','8','11','14','15']
     def maven = params.containsKey('maven') ? params.maven : '3.x.x'
     // def failFast = params.containsKey('failFast') ? params.failFast : true
     // Just temporarily
     def failFast = false;
-    def tmpWs = params.containsKey('tmpWs') ? params.tmpWs : false
     Map tasks = [failFast: failFast]
     boolean first = true
     for (String os in oses) {
@@ -76,38 +75,33 @@
         String stageId = "${os}-jdk${jdk}"
         tasks[stageId] = {
           node("${label}") {
-            def wsDir = pwd()
-            if (os == 'windows' && tmpWs) {
-              wsDir = 'F:\\short\\' + "$BUILD_TAG".replaceAll(/(.+)maven-box_maven-(.+)/) { "m-${it[2]}" }
+            stage("Checkout ${stageId}") {
+              echo "NODE_NAME = ${env.NODE_NAME}"
+              try {
+                dir('m') {
+                  checkout scm
+                }
+              } catch (Throwable e) {
+                // First step to keep the workspace clean and safe disk space
+                cleanWs()
+                if (!failFast) {
+                  throw e
+                } else if (failingFast == null) {
+                  failingFast = stageId
+                  echo "[FAIL FAST] This is the first failure and likely root cause"
+                  throw e
+                } else {
+                  echo "[FAIL FAST] ${failingFast} had first failure, ignoring ${e.message}"
+                }
+              } 
             }
-            ws( dir : "$wsDir" )
-              stage("Checkout ${stageId}") {
-                echo "NODE_NAME = ${env.NODE_NAME}"
-                try {
-                  dir('m') {
-                    checkout scm
-                  }
-                } catch (Throwable e) {
-                  // First step to keep the workspace clean and safe disk space
-                  cleanWs()
-                  if (!failFast) {
-                    throw e
-                  } else if (failingFast == null) {
-                    failingFast = stageId
-                    echo "[FAIL FAST] This is the first failure and likely root cause"
-                    throw e
-                  } else {
-                    echo "[FAIL FAST] ${failingFast} had first failure, ignoring ${e.message}"
-                  }
-                } 
-              }
-              stage("Build ${stageId}") {
-                if (failingFast != null) {
-                  cleanWs()
-                  echo "[FAIL FAST] ${failingFast} has failed. Skipping ${stageId}."
-                } else try {
-                  // mavenSettingsConfig: 'simple-deploy-settings-no-mirror',
-                  withMaven(jdk:jdkName, maven:mvnName, mavenLocalRepo:'.repository', 
+            stage("Build ${stageId}") {
+              if (failingFast != null) {
+                cleanWs()
+                echo "[FAIL FAST] ${failingFast} has failed. Skipping ${stageId}."
+              } else try {
+                // mavenSettingsConfig: 'simple-deploy-settings-no-mirror',
+                withMaven(jdk:jdkName, maven:mvnName, mavenLocalRepo:'.repository', 
                           options: [
                             artifactsPublisher(disabled: disablePublishers),
                             junitPublisher(ignoreAttachments: false),
@@ -117,41 +111,40 @@
 // DISABLED DUE TO INFRA-17514 invokerPublisher(),
                             pipelineGraphPublisher(disabled: disablePublishers)
                           ], publisherStrategy: 'EXPLICIT') {
-                  dir ('m') {
-                      if (isUnix()) {
-                        sh cmd.join(' ')
-                      } else {
-                        bat cmd.join(' ')
-                      }
+                dir ('m') {
+                    if (isUnix()) {
+                      sh cmd.join(' ')
+                    } else {
+                      bat cmd.join(' ')
                     }
                   }
-                } catch (Throwable e) {
-                  echo "[FAILURE-004] ${e}"
-                  // First step to keep the workspace clean and safe disk space
-                  cleanWs()
-                  if (!failFast) {
-                    throw e
-                  } else if (failingFast == null) {
-                    failingFast = stageId
-                    echo "[FAIL FAST] This is the first failure and likely root cause"
-                    throw e
-                  } else {
-                    echo "[FAIL FAST] ${failingFast} had first failure, ignoring ${e.message}"
-                  }
-                } finally {
-                  try {
-                    cleanWs()
-                  } catch(IOException e) {
-                    echo "Failed to clean up workspace: ${e}"
-                  }
                 }
-              }                
+              } catch (Throwable e) {
+                echo "[FAILURE-004] ${e}"
+                // First step to keep the workspace clean and safe disk space
+                cleanWs()
+                if (!failFast) {
+                  throw e
+                } else if (failingFast == null) {
+                  failingFast = stageId
+                  echo "[FAIL FAST] This is the first failure and likely root cause"
+                  throw e
+                } else {
+                  echo "[FAIL FAST] ${failingFast} had first failure, ignoring ${e.message}"
+                }
+              } finally {
+                try {
+                  cleanWs()
+		} catch(IOException e) {
+		  echo "Failed to clean up workspace: ${e}"
+		}
+              }
             }
           }
         }
       }
-
-          // run the parallel builds
+    }
+    // run the parallel builds
     parallel(tasks)
 
     // JENKINS-34376 seems to make it hard to detect the aborted builds
@@ -186,7 +179,7 @@
       echo "***** FAST FAILURE *****\n\nFast failure triggered by ${failingFast}\n\n***** FAST FAILURE *****"
     }
     stage("Notifications") {
-      jenkinsNotify()
+	  jenkinsNotify()
     }
   }
 }