Closed kwin closed 3 years ago
@kwin I'm not sure I follow your question and this seems like an implementation detail. If the merged settings.xml
has
<servers>
<server>
<id>adobe</id>
</server>
<server>
<id>my-custom</id>
</server>
</servers>
or
<servers>
<server>
<id>my-custom</id>
</server>
<server>
<id>adobe</id>
</server>
</servers>
Does this have a functional impact? The ids are unique so I don't believe the order in the merged settings.xml
really matters.
This is not about the server ids but about the repository ids. The question is whether Maven tries to download from custom repo first or last (after central and adobe)!
Ah... isn't that a question for Maven then?
First of all one needs to know how you merge the settings.xml because the order depends on the profile declaration order in the merged settings.xml! Compare also with https://issues.apache.org/jira/browse/MNG-6994.
That's the part I'm not following -- per the documentation, only the <server>
elements are merged by Cloud Manager. If there's some reason that the order of these need to be guaranteed, we can do that and ensure it is documented, but AFAIK the order of the <server>
elements is not important since those are only ever used by id reference.
Indeed, this is defined by Maven. There is no possibility to add a repo which is tried before adobe or central. The pom repository is always asked after all repositories from settings.xml
Issue in help/using/setting-up-project.md
As it is now possible to add custom repositories to the merged settings.xml it is sometimes important to know if the custom repository is added as first or last choice (after server ids
adobe
,cloud-manager
andcentral
or before them). In most of the cases the custom repository should be tried last (as no other repo should have the artifact with the same coordinates) but for some edge cases you might also want to overwrite an artifact also available with the same GAV in another repo.