From d4e6c0547ec9c568aad4984d3d31ed6979826360 Mon Sep 17 00:00:00 2001
From: Zzm0809 <934230207@qq.com>
Date: Tue, 27 Aug 2024 11:45:46 +0800
Subject: [PATCH 1/4] added npm profiles
Signed-off-by: Zzm0809 <934230207@qq.com>
---
dinky-web/pom.xml | 2 +-
docs/docs/deploy_guide/compile_deploy.md | 2 ++
docs/docs/developer_guide/local_debug.md | 2 ++
pom.xml | 15 +++++++++++++++
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dinky-web/pom.xml b/dinky-web/pom.xml
index c6637e4c1a..1a5bc6c0c6 100644
--- a/dinky-web/pom.xml
+++ b/dinky-web/pom.xml
@@ -67,7 +67,7 @@
- install --force
+ install --force --registry ${npm-registry-repo}
diff --git a/docs/docs/deploy_guide/compile_deploy.md b/docs/docs/deploy_guide/compile_deploy.md
index 9ce2f39cf1..4ef9a0da5a 100644
--- a/docs/docs/deploy_guide/compile_deploy.md
+++ b/docs/docs/deploy_guide/compile_deploy.md
@@ -95,6 +95,8 @@ cd /opt/dinky-source-code
# 编译打包 Profile, 注意 scala 支持 2.11 和 2.12, 请根据实际情况进行选择,jdk 支持 8/11,请根据实际情况进行选择,不选jdk11默认使用系统内的jdk8
mvn clean package -DskipTests=true -P prod,jdk11,flink-single-version,aliyun,flink-1.16,web
+# 如果需要前端依赖下载源为华为镜像,请添加 npm-huawei profile, 否则默认使用 npm 官方源, 编译命令如下:
+mvn clean package -DskipTests=true -P prod,jdk11,flink-single-version,aliyun,flink-1.16,web,npm-huawei
```
diff --git a/docs/docs/developer_guide/local_debug.md b/docs/docs/developer_guide/local_debug.md
index 94f2fbfa02..ca4831c394 100644
--- a/docs/docs/developer_guide/local_debug.md
+++ b/docs/docs/developer_guide/local_debug.md
@@ -118,6 +118,8 @@ Install/Package 过程中报错代码格式化问题,请参考 [代码格式化]
| jdk11 | 用于指定 JDK 版本为 11,前提是本地已经安装了 JDK 11,如果没有安装 jdk11,则默认使用本地的 jdk8 |
| mac | 用于适配在 mac 系统上进行调试 |
| maven-central | 用于指定 maven 仓库为中央仓库 |
+| npm-huawei | 默认在编译时前端依赖下载源为 npm 国外的官方仓库,如果需要使用**华为镜像**,请勾选此 profile |
+| npm-taobao | 默认在编译时前端依赖下载源为 npm 国外的官方仓库,如果需要使用**淘宝镜像**,请勾选此 profile |
| prod | 生产环境,默认选中,此功能主要用于编译打包,此 profile 会将部分依赖排除掉,不会打进最终 tar.gz 包内 |
| web | 打包前端资源,需要勾选 |
diff --git a/pom.xml b/pom.xml
index d0f67a713c..96d300431e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,6 +124,7 @@
3.46.0.0
8
1.16.2
+ https://registry.npmjs.org/
@@ -1012,6 +1013,20 @@
+
+ npm-huawei
+
+ https://repo.huaweicloud.com/repository/npm/
+
+
+
+
+ npm-taobao
+
+ https://registry.npm.taobao.org/
+
+
+
prod
From 1271df357597dfc87903cb685f687e67a823f301 Mon Sep 17 00:00:00 2001
From: Zzm0809
Date: Tue, 27 Aug 2024 03:48:14 +0000
Subject: [PATCH 2/4] Spotless Apply
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 96d300431e..6d50cbd0a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,6 +99,7 @@
3.12.4
3.5.7
8.0.28
+ https://registry.npmjs.org/
12.2.0.1
0.21.0
6.4.2
@@ -124,7 +125,6 @@
3.46.0.0
8
1.16.2
- https://registry.npmjs.org/
From b843e2cf9a1cdbaab11ff270342bd14af388683e Mon Sep 17 00:00:00 2001
From: Zzm0809 <934230207@qq.com>
Date: Tue, 27 Aug 2024 11:55:01 +0800
Subject: [PATCH 3/4] Optimize copywriting
Signed-off-by: Zzm0809 <934230207@qq.com>
---
dinky-web/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dinky-web/pom.xml b/dinky-web/pom.xml
index 1a5bc6c0c6..fc1d63f628 100644
--- a/dinky-web/pom.xml
+++ b/dinky-web/pom.xml
@@ -66,7 +66,7 @@
npm
-
+
install --force --registry ${npm-registry-repo}
From 8ba73f795b6e166470b6ad6ccd3a0037a378c8a1 Mon Sep 17 00:00:00 2001
From: Zzm0809 <934230207@qq.com>
Date: Tue, 27 Aug 2024 14:48:27 +0800
Subject: [PATCH 4/4] added npm profiles
Signed-off-by: Zzm0809 <934230207@qq.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6d50cbd0a9..9f7fc7ef90 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1023,7 +1023,7 @@
npm-taobao
- https://registry.npm.taobao.org/
+ https://registry.npmmirror.com/