Binary Lion Studios

I code for fun and for food.

The scm url cannot be null

Today I was trying to integrate the Build Number Maven Plugin into our build process and came across the following error:

1
2
3
4
5
6
7
8
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The scm url cannot be null.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException: The scm url cannot be null.
...

After some fruitless Googling, I found this issue in their project issue tracker:

Actually, what is looked-for in the code is <scm><developerConnection> which is confusing, since <scm><url> exists (but has nothing to do) and we might think that <scm><connection> is largely enough to check the working copy for modification.

You’ll need to add the SCM element to your parent POM and make sure you have the <developerConnection> node. Adding this bit resolved the issue.