From 71047db39ea97373411a674ab0f3efe647f28a9d Mon Sep 17 00:00:00 2001 From: LiuBodong Date: Thu, 4 Nov 2021 20:17:53 +0800 Subject: [PATCH] [FIX][Standalone Server] check if maven settings.xml not exists (#6691) --- .../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 871fe66868..ab40757396 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; }