From dc5460d5258f3b442e60f761598f379654925158 Mon Sep 17 00:00:00 2001 From: Gautham B A Date: Wed, 15 Jun 2022 15:29:55 +0530 Subject: [PATCH] YARN-11078. Set env vars in a cross platform compatible way (#4432) * Maven runs the ember build script. The environment variable TMPDIR was set as per bash syntax. * This failed on Windows since the Windows command prompt doesn't support bash syntax. * We're now detecting the OS and setting a Maven property "emberBuildScript" in a cross platform compatible way. --- .../hadoop-yarn/hadoop-yarn-ui/pom.xml | 30 ++++++++++++++++++- .../src/main/webapp/package.json | 3 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml index ca291ec85d..e18a7eac33 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml @@ -38,6 +38,34 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + validate + + run + + + true + + + + + + + + Ember build script to use = ${emberBuildScript} + + + + + + org.apache.rat @@ -229,7 +257,7 @@ ${packageManagerScript} run - build:mvn + ${emberBuildScript} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json index 91c5a0f3e6..deb79a722e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json @@ -10,7 +10,8 @@ "scripts": { "build": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember build", "start": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember server", - "build:mvn": "TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember build -prod" + "build:mvn": "TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember build -prod", + "build:mvn:windows": "set TMPDIR=tmp; node/node ./node_modules/ember-cli/bin/ember build -prod" }, "repository": "", "engines": {