Allow build to run even if there is no Git remote named origin (#20608)

The build currently depends on the presence of a Git remote named origin to determine the URL that is used in the generated POM file. As this is best-effort anyhow and only required by Maven Central, this commit allows the build to run even if a Git remote with the name "origin" is missing.
This commit is contained in:
Yannick Welsch 2016-09-21 17:22:06 +02:00 committed by GitHub
parent c97e713196
commit 47088cc206

View File

@ -176,6 +176,9 @@ public class PluginBuildPlugin extends BuildPlugin {
/** Find the reponame. */
static String urlFromOrigin(String origin) {
if (origin == null) {
return null // best effort, the url doesnt really matter, it is just required by maven central
}
if (origin.startsWith('https')) {
return origin
}