Repository navigation
Check the diagnostic's report without naming Maven Central's or the plugin portal's URL - #206
Merged
Merged
Conversation
…lugin portal's URL Which URL a build reaches Maven Central and the Gradle Plugin Portal at depends on the machine. Where CI names a mirror, as the Code Genome Project's builds do, the mirror stands in for both, and gradle(), gradleNoDefaultRepos() and dependencyNotFound() failed there: gradle() found 3 rows instead of 4, the mirror counting once for both. The tests now check the repositories they declare by URL, and Central and the plugin portal only by being reachable. maven() forced empty settings, so it always pinged Maven Central itself; it now reaches Central through MAVEN_CENTRAL_MIRROR_URL when that is set.
jkschneider
added a commit
that referenced
this pull request
Oct 25, 2026
… Central directly (#207) Where CI names a mirror, as the Code Genome Project's builds do, two tests still reached repo.maven.apache.org directly. DependencyListTest#validateResolvable gives the recipe an LST whose only repository can't be reached. Its xml() source loads no Maven settings, and the downloader adds Maven Central behind that repository, so the test asked Central for com/test/test/maven-metadata.xml and its directory listing, and got 404s. Its context now leaves out Central and the local repository, so the pretend repository is the only one asked. The recipe still reports the MavenDownloadingException the test checks for. ModuleHasDependencyTest.WhenDependencyIsRequestedButNotResolved#mavenMatchesOnRequested forced empty settings, which keep the machine's own out but name no mirror, so spring-beans 6.0.0 and the POMs it needs came from Central directly. Like DependencyResolutionDiagnosticTest#maven since #206, it now uses settings that mirror only Central through MAVEN_CENTRAL_MIRROR_URL, _USERNAME and _PASSWORD when they are set, and the same empty settings when they are not. settingsMirroringOnlyCentral moves from DependencyResolutionDiagnosticTest to MavenCentralMirror so that both tests can use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DependencyResolutionDiagnosticTestasserted that the report listshttps://repo.maven.apache.org/maven2andhttps://plugins.gradle.org/m2by URL. Which URL a build reaches them at depends on the machine: where CI names a mirror, as the Code Genome Project's builds do (MAVEN_CENTRAL_MIRROR_URL, and Maven settings that mirror everything through it), the mirror stands in for both. Theregradle(),gradleNoDefaultRepos()anddependencyNotFound()failed;gradle()found 3 rows instead of 4, the mirror counting once for both Central and the portal.nonexistent.moderne.iofailing with an unknown host. Maven Central and the plugin portal they check only by being reachable, at whatever URL the machine reaches them.maven()forced empty settings, so it always pinged Maven Central itself, and failed whenever Central refused the machine. It now mirrors only Central, throughMAVEN_CENTRAL_MIRROR_URLwhen that is set, which keeps the pom's own repository visible; with no mirror named it keeps the empty settings.Locally the class passes with and without
MAVEN_CENTRAL_MIRROR_*set, 6 tests each.