jira-importer commented on issue #1055: URL: https://github.com/apache/maven-scm/issues/1055#issuecomment-2964643098
**[phansson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=phansson)** commented I've reviewed the code in the plugin. The crucial part is [AbstractScmMojo.loadInfosFromSettings()](https://github.com/apache/maven-scm/blob/master/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java). So what happens today is actually pure hostname matching except if port is given explicitly in the URL then the matching is done on host:port string. Incidentially I see no documentation about this outside of the source code (a little hidden gem). I see now that my proposal will only work with SCMs that use an URL scheme such as Hg or Git. More specifically it will work with an SCM that supports URL schemes which supports a ``` \<protocol>://[user[:pass]@]host[:port]/[path] ```like syntax. Normally this will be HTTP, HTTPS and SSH. The way I would go about it is that I would create new non-abstract method in `ScmProviderRepositoryWithHost`. Something like ```java public String getUrlStrForSettingsMatching() { return getHost(); } ``` SCM implementers could then implement this method or leave it as is. The primary goal is to take URL username and URL path into account when matching. While the window is open there's no reason not to also include URL protocol name in the matching although the use case for that one is a bit far fetched. -- 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]
