dsmiley opened a new pull request, #4677:
URL: https://github.com/apache/solr/pull/4677

   Centralize repository declarations (single mirror choke-point)
   
   ## Motivation
   
   Repository declarations (`mavenCentral()`, `gradlePluginPortal()`) were 
scattered
   across the build in every distinct Gradle repository scope: plugin 
resolution,
   project dependencies, the buildscript classpath of several convention 
scripts, and
   the two included builds. There was no single place for an enterprise to 
redirect
   resolution to an internal mirror (Artifactory/Nexus).
   
   ## What this does
   
   Introduces one shared file, 
`build-tools/build-infra/declare-repositories.gradle`,
   as the single source of repository declarations, and applies it into every
   consumption scope via `apply from: ..., to: <handler>`:
   
   - `settings.gradle` -> `pluginManagement` (plugin resolution)
   - `gradle/globals.gradle` -> `allprojects` (project dependencies)
   - `solr/ui/build.gradle.kts` (keeps its module-specific `google()`, routes 
the rest)
   - the `buildscript {}` blocks in `git-status`, `rat-sources`, `jar-checks`,
     `randomization`, `markdown`, and `solr/docker` (buildscript classpath)
   - `build-tools/build-infra` and `build-tools/missing-doclet` (included 
builds)
   
   Placing the file under `build-tools/build-infra/` lets the 
classloader-isolated
   included builds reach it by relative path. This follows the same pattern 
Lucene
   uses upstream.
   
   ## Enterprise mirror
   
   Set one of the following and the entire build (including the included 
builds, which
   inherit JVM system properties / environment) resolves exclusively from the 
mirror,
   excluding public repositories:
   
   - `-Dsolr.maven.repo.url=https://.../maven` (or 
`systemProp.solr.maven.repo.url=...`
     in `gradle.properties`)
   - `SOLR_MAVEN_REPO_URL=https://.../maven` environment variable
   
   With neither set, behavior is unchanged (`mavenCentral()` + 
`gradlePluginPortal()`).
   
   ## Notes
   
   - Removed a dead commented-out `LucenePrerelease` repository template in
     `gradle/globals.gradle` (still in git history); it didn't belong in a file 
shared
     with `pluginManagement`.
   - Intentionally left alone: publishing targets in `gradle/maven/*.gradle` 
and the
     dev-only `mavenLocal()` in `gradle/lucene-dev/*` (not consumption repos).
   
   ## Verification
   
   - `gradlew help` (all scopes), `:build-infra:help`, and `:solr:ui:help`
     (`-PdisableUiModule=false`) all configure cleanly.
   - Setting a bogus mirror via both the system property and the env var 
redirects all
     scopes to it exclusively (plugin resolution fails against the bogus URL 
only),
     confirming the override works and public repos are dropped.
   - Dependency locking still validates for both the buildscript classpath and 
project
     configurations; no lockfiles changed (mavenCentral remains first, so 
resolution is
     unchanged when no mirror is set).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to