On Thu, 13 Oct 2016 02:53:54 +0200, Christian Schulte <c...@schulte.it> wrote:

Am 10/12/16 um 23:17 schrieb Robert Scholte:
It is a bit different: the *effective* settings are the global settings
where parts can be overridden with the user settings. This means that all
profiles will be there, during build the content of profiles will keep
overriding each other. So is the order of profiles correct in the
effective settings?

It's done by method 'shallowMergeById' in the following class.

<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java;h=8d9f67b1fcbee52000cbed55a3c79a343c96ae26;hb=HEAD>

It will add profiles from the global settings to the end of the list of
profiles from the user settings making that list the effective list of
profiles. So a profile from the global settings will be last in the list
of effective settings when no profile with the same id exists in the
user settings. The profile in question uses a UUID for the id. So that
will always come after any profiles of the user settings. Same for the
effective list of active profiles.

This ends in the following class overriding any repository with id
'central' from the user settings with the values from the global settings.

<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java;h=aed837bf2b89479b2f150add0c77f684687d621d;hb=HEAD>

Should I change the order of the effective settings so that things from
the global settings always come before the user settings? Will that blow
up somewhere else. We know nothing about how users have edited theire
global settings. Just leave the repositories in the 4.0.0 super pom and
revert the commits? I consider the order wrong, btw.

Regards,

I'd say revert these changes. We see that this "hack" doesn't always work. Better look for a more solid solution with another release in the future.

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to