You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2021/11/04 12:18:00 UTC

[dolphinscheduler] branch dev updated: [FIX][Standalone Server] check if maven settings.xml not exists (#6691)

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

leonbao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 71047db  [FIX][Standalone Server] check if maven settings.xml not exists (#6691)
71047db is described below

commit 71047db39ea97373411a674ab0f3efe647f28a9d
Author: LiuBodong <li...@126.com>
AuthorDate: Thu Nov 4 20:17:53 2021 +0800

    [FIX][Standalone Server] check if maven settings.xml not exists (#6691)
---
 .../dolphinscheduler/spi/plugin/DolphinPluginManagerConfig.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginManagerConfig.java b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginManagerConfig.java
index 871fe66..ab40757 100644
--- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginManagerConfig.java
+++ b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginManagerConfig.java
@@ -138,12 +138,12 @@ public class DolphinPluginManagerConfig {
         // get 'settings.xml' from user home
         Path settingsXmlPath = getMavenSettingsXmlFromUserHome();
         // if user home does not exist settings.xml, get from '$MAVEN_HOME/conf/settings.xml'
-        if (settingsXmlPath == null) {
+        if (settingsXmlPath == null || !Files.exists(settingsXmlPath)) {
             logger.info("User home does not exists maven settings.xml");
             settingsXmlPath = getMavenSettingsXmlFromEvn();
         }
         // still not exist, return default repository
-        if (settingsXmlPath == null) {
+        if (settingsXmlPath == null || !Files.exists(settingsXmlPath)) {
             logger.info("Maven home does not exists maven settings.xml, use default");
             return defaultRepository;
         }