You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by tic01 <il...@gmail.com> on 2020/03/12 11:12:07 UTC

Overwriting the "central" from settings.xml when importing bom pom files

Hi team,

When resolving bom artifacts, the following method is invoked -
org.apache.maven.model.building.DefaultModelBuilder#configureResolver(
ModelResolver modelResolver, Model model, DefaultModelProblemCollector
problems, boolean replaceRepositories )

The 'replaceRepositories' parameter is invoked with a value of 'true' which
means that Maven looks up the lineage of of projects to find a repository.
This has the effect that if for example you have in your settings.xml a
repository with the id "central" set to "REPO A" it will replace that with
repo1.

Is this the desired behavior? Is there a way to tell Maven not to override
the repositories that I have in my Maven settings.xml as this causes unsable
builds if you are behind a company firewall and must use a middle-man
(Nexus/Artifactory).

Thanks,

Tomer





--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Overwriting the "central" from settings.xml when importing bom pom files

Posted by tic01 <il...@gmail.com>.
Thanks Thomas.
mirrors are an option, but I was wondering if there is a reason that only
for nested boms the override of "central" doesn't work



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Overwriting the "central" from settings.xml when importing bom pom files

Posted by Thomas Broyer <t....@gmail.com>.
Not a direct answer but what if you use a <mirror> rather overriding the
"central" <repository>?
https://maven.apache.org/guides/mini/guide-mirror-settings.html

Le dim. 15 mars 2020 à 18:17, tic01 <il...@gmail.com> a écrit :

> Hi team,
>
> When resolving bom artifacts, the following method is invoked -
> org.apache.maven.model.building.DefaultModelBuilder#configureResolver(
> ModelResolver modelResolver, Model model, DefaultModelProblemCollector
> problems, boolean replaceRepositories )
>
> The 'replaceRepositories' parameter is invoked with a value of 'true' which
> means that Maven looks up the lineage of of projects to find a repository.
> This has the effect that if for example you have in your settings.xml a
> repository with the id "central" set to "REPO A" it will replace that with
> repo1.
>
> Is this the desired behavior? Is there a way to tell Maven not to override
> the repositories that I have in my Maven settings.xml as this causes
> unsable
> builds if you are behind a company firewall and must use a middle-man
> (Nexus/Artifactory).
>
> Thanks,
>
> Tomer
>
>
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>