From 1900d1d1efe098da305ce287703f72a4283bbc67 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Sat, 4 May 2019 08:48:56 +0530 Subject: [PATCH] Add frontend-maven-plugin --- .gitignore | 2 + .../mgt/handler/util/HandlerConstants.java | 2 +- .../pom.xml | 92 ++++++++++++++----- .../pom.xml | 92 ++++++++++++++----- pom.xml | 3 + 5 files changed, 142 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index 206f9cee2d..5f3192e51f 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,9 @@ components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/r components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package-lock.json components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/npm-debug.log components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/dist/ +components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/tmp/ components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/node_modules/ components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/dist/ components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/package-lock.json +components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/tmp/ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.handler/src/main/java/org/wso2/carbon/device/application/mgt/handler/util/HandlerConstants.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.handler/src/main/java/org/wso2/carbon/device/application/mgt/handler/util/HandlerConstants.java index 4ff23c4077..d8804ca834 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.handler/src/main/java/org/wso2/carbon/device/application/mgt/handler/util/HandlerConstants.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.handler/src/main/java/org/wso2/carbon/device/application/mgt/handler/util/HandlerConstants.java @@ -40,5 +40,5 @@ public class HandlerConstants { public static final String TOKEN_IS_EXPIRED = "ACCESS_TOKEN_IS_EXPIRED"; public static final int INTERNAL_ERROR_CODE = 500; - public static final long TIMEOUT = 300; + public static final long TIMEOUT = 1200; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml index 4f0db31d01..e20c85c95b 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml @@ -51,45 +51,88 @@ - org.codehaus.mojo - exec-maven-plugin - 1.5.0 + com.github.eirslett + frontend-maven-plugin + ${frontend.mave.version} + + ${npm.working.dir} + + ${npm.install.dir} + - npm install (initialize) + install node and npm + + install-node-and-npm + + generate-resources + + ${node.version} + ${npm.version} + + + + npm install - exec + npm - initialize + - react-app - ${npm.executable} - - install - --silent - + install - npm run build (compile) + prod - exec + npm - compile - react-app - ${npm.executable} - - run - ${npm.build.command} - + run-script ${npm.build.command} + generate-resources - - ${npm.working.dir} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111,6 +154,7 @@ npm build_prod ./react-app + ./react-app/tmp UTF-8 react-app diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml index 1ca50ca6d3..7aa43d7f6a 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml @@ -54,45 +54,88 @@ - org.codehaus.mojo - exec-maven-plugin - 1.5.0 + com.github.eirslett + frontend-maven-plugin + ${frontend.mave.version} + + ${npm.working.dir} + + ${npm.install.dir} + - npm install (initialize) + install node and npm + + install-node-and-npm + + generate-resources + + ${node.version} + ${npm.version} + + + + npm install - exec + npm - initialize + - react-app - ${npm.executable} - - install - --silent - + install - npm run build (compile) + prod - exec + npm - compile - react-app - ${npm.executable} - - run - ${npm.build.command} - + run-script ${npm.build.command} + generate-resources - - ${npm.working.dir} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +157,7 @@ npm build_prod ./react-app + ./react-app/tmp UTF-8 react-app diff --git a/pom.xml b/pom.xml index 502fa2c3dd..e761f5ec6d 100644 --- a/pom.xml +++ b/pom.xml @@ -2230,6 +2230,9 @@ 1.21 2.6.5 + 1.7.6 + v10.15.3 + 6.9.0 7.0.85