slawekjaranowski commented on code in PR #909:
URL: https://github.com/apache/maven/pull/909#discussion_r1048712224
##########
maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java:
##########
@@ -51,6 +52,25 @@ public static Settings merge(Settings dominant, Settings
recessive, String reces
return new MavenSettingsMerger().merge(dominant, recessive,
recessiveSourceLevel);
}
+ /**
+ * @param dominant
+ * @param recessive
+ * @param recessiveSourceLevel
+ * @deprecated please use {@link #merge(Settings, Settings, String)}
+ */
+ @Deprecated
+ public static void merge(
+ org.apache.maven.settings.Settings dominant,
+ org.apache.maven.settings.Settings recessive,
+ String recessiveSourceLevel) {
+
+ if (dominant == null || recessive == null) {
+ return;
+ }
+
+ dominant.delegate = new SettingsMerger().merge(dominant.getDelegate(),
recessive.getDelegate(), true, null);
Review Comment:
> The only non immutable bit in the m4 `Settings` is the `sourceLevel` which
I also have no idea where/why/how/if it's used.
Exactly, and `sourceLevel` can be set once - it is a reason why I used
`SettingsMerger`.
m-invoker-p has a hack for it:
https://github.com/apache/maven-invoker-plugin/blob/bfb75f9e52e93478dab710bb7243978c06f48d1a/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L1580-L1618
but only works with Maven3 - 4 has session in delegate field
We also can relax of settings `sourceLevel`.
By the way we have double implementation `MavenSettingsMerger` and
`SettingsMerger` IMHO we should use one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]