From 550f0c90fca9f4ba6a983579828dab81456b19db Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Sat, 15 Oct 2022 01:33:17 +0200 Subject: [PATCH] Restore compatibility for the maven-release-plugin --- .../org/apache/maven/settings/SettingsUtils.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java b/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java index bbdd85e6bc..d6d65a75e3 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java +++ b/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java @@ -295,4 +295,16 @@ public final class SettingsUtils return policy; } + /** + * @param settings could be null + * @return a new instance of settings or null if settings was null. + */ + public static org.apache.maven.settings.Settings copySettings( org.apache.maven.settings.Settings settings ) + { + if ( settings == null ) + { + return null; + } + return new org.apache.maven.settings.Settings( settings.getDelegate() ); + } }