Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0
-
None
-
Patch
Description
Running scm:branch without a branch name results in the misleading error:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot run branch command : Embedded error: Exception while executing SCM command. Missing parameter: 'branchName'. [INFO] ------------------------------------------------------------------------
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:
[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] ------------------------------------------------------------------------