From 3110b4b564ae1c90212a4c9c0e5dc32e8ae1a771 Mon Sep 17 00:00:00 2001 From: Xueqin Cui Date: Thu, 27 Feb 2025 11:49:38 +1100 Subject: [PATCH 1/2] fix: use Maven Central as registry for pomxmlnet extractor --- clients/datasource/maven_registry.go | 4 ---- extractor/filesystem/language/java/pomxmlnet/pomxmlnet.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/clients/datasource/maven_registry.go b/clients/datasource/maven_registry.go index bb7719b1..22467d47 100644 --- a/clients/datasource/maven_registry.go +++ b/clients/datasource/maven_registry.go @@ -36,10 +36,6 @@ import ( // MavenCentral holds the URL of Maven Central Repository. const MavenCentral = "https://repo.maven.apache.org/maven2" -// MavenCentralMirror holds the URL of Maven Central mirror hosted on Google Cloud Storage. -// https://storage-download.googleapis.com/maven-central/index.html -const MavenCentralMirror = "https://maven-central.storage-download.googleapis.com/maven2/" - var errAPIFailed = errors.New("API query failed") // MavenRegistryAPIClient defines a client to fetch metadata from a Maven registry. diff --git a/extractor/filesystem/language/java/pomxmlnet/pomxmlnet.go b/extractor/filesystem/language/java/pomxmlnet/pomxmlnet.go index 84405678..7b03a289 100644 --- a/extractor/filesystem/language/java/pomxmlnet/pomxmlnet.go +++ b/extractor/filesystem/language/java/pomxmlnet/pomxmlnet.go @@ -69,7 +69,7 @@ func NewConfig(registry string) Config { // DefaultConfig returns the default configuration for the pomxmlnet extractor. func DefaultConfig() Config { - return NewConfig(datasource.MavenCentralMirror) + return NewConfig(datasource.MavenCentral) } // New makes a new pom.xml transitive extractor with the given config. From e64a49de6d76f23be007f313303ce6806af9aa86 Mon Sep 17 00:00:00 2001 From: Xueqin Cui Date: Thu, 27 Feb 2025 11:51:31 +1100 Subject: [PATCH 2/2] keep const --- clients/datasource/maven_registry.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clients/datasource/maven_registry.go b/clients/datasource/maven_registry.go index 22467d47..bb7719b1 100644 --- a/clients/datasource/maven_registry.go +++ b/clients/datasource/maven_registry.go @@ -36,6 +36,10 @@ import ( // MavenCentral holds the URL of Maven Central Repository. const MavenCentral = "https://repo.maven.apache.org/maven2" +// MavenCentralMirror holds the URL of Maven Central mirror hosted on Google Cloud Storage. +// https://storage-download.googleapis.com/maven-central/index.html +const MavenCentralMirror = "https://maven-central.storage-download.googleapis.com/maven2/" + var errAPIFailed = errors.New("API query failed") // MavenRegistryAPIClient defines a client to fetch metadata from a Maven registry.