Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal object MuzzleMavenRepoUtils {
listOf(central)
} else {
val proxy = RemoteRepository.Builder("central-proxy", "default", mavenProxyUrl).build()
listOf(proxy, central)
listOf(proxy)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Treat blank proxy values as absent

CI or external builds that export an unset optional proxy variable as an empty string can fail all general dependency resolution before tests run.

Assertion details
  • Input: MAVEN_REPOSITORY_PROXY or ORG_GRADLE_PROJECT_mavenRepositoryProxy is present but empty or whitespace-only, such as when shell setup exports an undefined variable.
  • Expected: Normalize both proxy values before repository selection and treat blank or whitespace-only values as absent, retaining Maven Central. This requires coordinated changes in both changed files and coverage for blank environment/property values, so no single inline suggestion is complete.
  • Actual: Both changed paths use presence-only checks. An empty MAVEN_REPOSITORY_PROXY now produces only an empty proxy repository, while a present-but-empty Gradle property suppresses mavenCentral(); clean dependency resolution therefore has no usable general repository. Existing tests cover non-empty fixture proxies but not blank default-repository selection.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

}
}

Expand Down
3 changes: 2 additions & 1 deletion gradle/repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ repositories {
url project.rootProject.property("mavenRepositoryProxy")
allowInsecureProtocol = true
}
} else {
mavenCentral()
}
mavenCentral()
// add maven central repository for snapshot dependencies
maven {
content {
Expand Down