Browse Source

[FIX][Standalone Server] check if maven settings.xml not exists (#6691)

3.0.0/version-upgrade
LiuBodong 3 years ago committed by GitHub
parent
commit
71047db39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginManagerConfig.java

4
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;
}

Loading…
Cancel
Save