mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
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:
parent
c97e713196
commit
47088cc206
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user