From 4788055ff37f5c37f3664d29464eeba424c34219 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Fri, 20 Dec 2024 13:40:17 +0100 Subject: [PATCH] Check Maven Central before Apache-specific repositories GitHub Actions builds are hitting the rule from https://infra.apache.org/infra-ban.html that disallows excessive 404's on repository.apache.org, causing them to get banned. This change should make various builds check Maven Central before checking `repository.apache.org`, which hopefully should help. --- .../pom.xml | 5 +++++ .../pkg/command/quarkus/quarkus_project.go | 1 + .../pom1-expected.xml_no_auto_formatting | 5 +++++ packages/maven-base/settings.xml | 16 ++++++++-------- .../maven-m2-repo-via-http-settings.xml.envsubst | 16 ++++++++-------- .../kogito-maven/common/maven/settings.xml | 8 ++++++++ packages/stunner-editors/pom.xml | 5 +++++ 7 files changed, 40 insertions(+), 16 deletions(-) diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index 07fa2b09361..0f9d5d9b28b 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -367,6 +367,11 @@ + + central + Central Repository + https://repo.maven.apache.org/maven2 + apache.snapshots Apache Snapshot Repository diff --git a/packages/kn-plugin-workflow/pkg/command/quarkus/quarkus_project.go b/packages/kn-plugin-workflow/pkg/command/quarkus/quarkus_project.go index 6d3bf133e51..d61d559c6b4 100644 --- a/packages/kn-plugin-workflow/pkg/command/quarkus/quarkus_project.go +++ b/packages/kn-plugin-workflow/pkg/command/quarkus/quarkus_project.go @@ -154,6 +154,7 @@ func manipulatePomToKogito(filename string, cfg CreateQuarkusProjectConfig) erro //add apache repository after profiles declaration var repositories = []Repository{ + {Id: "central", Name: "Central Repository", Url: "https://repo.maven.apache.org/maven2"}, {Id: "apache-public-repository-group", Name: "Apache Public Repository Group", Url: "https://repository.apache.org/content/groups/public/"}, {Id: "apache-snapshot-repository-group", Name: "Apache Snapshot Repository Group", Url: "https://repository.apache.org/content/groups/snapshots/"}, } diff --git a/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting b/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting index 0efd07e2acf..d70abb8ab8e 100644 --- a/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting +++ b/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting @@ -184,6 +184,11 @@ + + central + Central Repository + https://repo.maven.apache.org/maven2 + apache-public-repository-group Apache Public Repository Group diff --git a/packages/maven-base/settings.xml b/packages/maven-base/settings.xml index 7b260596554..cb0fe51dc79 100644 --- a/packages/maven-base/settings.xml +++ b/packages/maven-base/settings.xml @@ -31,6 +31,14 @@ + + central + Central Repository + https://repo.maven.apache.org/maven2 + + false + + apache.snapshots Apache Snapshot Repository @@ -43,14 +51,6 @@ never - - central - Central Repository - https://repo.maven.apache.org/maven2 - - false - - apache-public-repository-group Apache Public Repository Group diff --git a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst index ad8a808e6c8..ec5de1ce404 100644 --- a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst +++ b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst @@ -26,6 +26,14 @@ true + + central + Central Repository + https://repo.maven.apache.org/maven2 + + false + + kie-tools--maven-m2-repo-via-http KIE Tools :: Maven M2 Repo via HTTP @@ -54,14 +62,6 @@ never - - central - Central Repository - https://repo.maven.apache.org/maven2 - - false - - apache-public-repository-group Apache Public Repository Group diff --git a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml index eae20db74b4..0321d0c5b2f 100644 --- a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml +++ b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml @@ -18,6 +18,14 @@ kogito-images + + central + Central Repository + https://repo.maven.apache.org/maven2 + + false + + apache-public-repository-group Apache Public Repository Group diff --git a/packages/stunner-editors/pom.xml b/packages/stunner-editors/pom.xml index 92ad6a927b0..4112d00afef 100644 --- a/packages/stunner-editors/pom.xml +++ b/packages/stunner-editors/pom.xml @@ -257,6 +257,11 @@ + + central + Central Repository + https://repo.maven.apache.org/maven2 + jboss