[
https://issues.apache.org/jira/browse/SCM-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17964534#comment-17964534
]
Olivier Lamy commented on SCM-390:
----------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-scm#601|https://github.com/apache/maven-scm/issues/601].
> scm:branch gives misleading error when branch name parameter is missing
> -----------------------------------------------------------------------
>
> Key: SCM-390
> URL: https://issues.apache.org/jira/browse/SCM-390
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Improvement
> Components: maven-plugin
> Affects Versions: 1.0
> Reporter: Mark Hobson
> Assignee: Siveton Vincent
> Priority: Minor
> Fix For: 1.1
>
> Attachments: SCM-390.patch
>
>
> Running scm:branch without a branch name results in the misleading error:
> {noformat}
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Cannot run branch command :
> Embedded error: Exception while executing SCM command.
> Missing parameter: 'branchName'.
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
> The actual branch name parameter is called 'branch', but the error message
> complains about a missing 'branchName' parameter. This is due to the
> discrepancy between scm command and mojo parameter names.
> A good fix would be to mark the branch name mojo parameter as required, since
> the goal is pretty useless without it. This gives a better error message:
> {noformat}
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] One or more required plugin parameters are invalid/missing for
> 'scm:branch'
> [0] Inside the definition for plugin 'maven-scm-plugin' specify the following:
> <configuration>
> ...
> <branch>VALUE</branch>
> </configuration>
> -OR-
> on the command line, specify: '-Dbranch=VALUE'
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)