When Registering for Maven Central/central.sonatype.org is it mandatory to specify the Project URL/SCM URL.
I have a private github repo, but I want to publish my librar
Yes it's required according to the requirements.
The connection to your source control system is another required element.
In the Maven guide it says
What about artifacts that can't be distributed because of their license? In that case only the POM for that dependency is required, listing where the dependency can be downloaded from. See an example.