[ http://jira.codehaus.org/browse/SCM-31?page=comments#action_54374 ]
Dennis Lundberg commented on SCM-31: ------------------------------------ Where in the code chain would you like this? I looked at the code and found this chain of execution regarding validation of the scmUrl: maven-scm-plugin - ValidateMojo.execute() - ValidateMojo.validateConnection( String connectionString, String type ) maven-scm-api - AbstractScmManager.validateScmRepository( String scmUrl ) - AbstractScmProvider.validateScmUrl( String scmSpecificUrl, char delimiter ) maven-scm-provider - CvsScmProvider.validateScmUrl( String scmSpecificUrl, char delimiter ) / SvnScmProvider.validateScmUrl( String scmSpecificUrl, char delimiter ) - CvsScmProvider.parseScmUrl( String scmSpecificUrl, char delimiter ) / SvnScmProvider.validateScmUrl( String scmSpecificUrl, char delimiter ) The other scm implementations just uses the default implementation available in AbstractScmProvider which makes a call to makeProviderScmRepository( String scmSpecificUrl, char delimiter ) My choice would be to put the resource files inside maven-scm-api somewhere, and put constants defining the error messages in AbstractScmProvider. To make this work we also need a list of possible error codes. Here's something to start with. It's basically a harvesting from the chain above: - Malformed URL - Cannot be null - Must start with "scm" - No such provider - The SCM provider cannot return null from validateScmUrl() - Illegal delimiter - Too few tokens - Too many tokens - Unknown transport (found in cvs provider) - Various "The user_password_host part must be on the form: ..<specific format>." (found in cvs provider) - Various "A svn '<protocol>' url must be on the form ...<specific format>" (found in svn provider) > The scm url validator should return a code corresponding to the error > --------------------------------------------------------------------- > > Key: SCM-31 > URL: http://jira.codehaus.org/browse/SCM-31 > Project: Maven SCM > Type: Improvement > Versions: 1.0-alpha-1 > Reporter: Jason van Zyl > Fix For: 1.0-beta-3 > > > I would like an error code to be returned so that I can use the error code to > select an i18n key that will provide users with a localized error message. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira