[ 
https://issues.apache.org/jira/browse/MNG-8050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17817081#comment-17817081
 ] 

Konrad Windszus commented on MNG-8050:
--------------------------------------

Overwriting of the POM repository with the repository having the same id from 
settings.xml happens in 
[{{DefaultModelBuilder.build(...}}|https://github.com/apache/maven/blob/bc0240f3c744dd6b6ec2920b3cd08dcc295161ae/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L317].
 This is the place where some validation would need to happen, as at the time 
when Model validation happens the active external profiles (from settings.xml) 
are not accessible.

> Same repositories IDs in settings.xml and POM are not detected
> --------------------------------------------------------------
>
>                 Key: MNG-8050
>                 URL: https://issues.apache.org/jira/browse/MNG-8050
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Konrad Windszus
>            Priority: Major
>
> When the same repository ID is used in repositories defined in 
>  # {{settings.xml}} and
>  # POM
> the one from the POM is just silently ignored and no ERROR is emitted.
> OTOH when defining repositories with the same ID in POM the following error 
> is emitted:
> {code}
> [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] 'repositories.repository.id' must be unique ....
> {code}
> A similar error should be emitted for repository ID clashes in 
> {{settings.xml}} (both local and global) and POM
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to