scm:branch gives misleading error when branch name parameter is missing
-----------------------------------------------------------------------
Key: SCM-390
URL: http://jira.codehaus.org/browse/SCM-390
Project: Maven SCM
Issue Type: Improvement
Components: maven-plugin
Affects Versions: 1.0
Reporter: Mark Hobson
Priority: Minor
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 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