grafana / grafana/pyroscope-java
Clean up dead publishing repository config and credentials in subproject build files
- Lenguaje dominante
- Java
- Estrellas
- 126
- Forks
- 48
- Merge medio
- 4 d 14 h
- PR fusionados (30 d)
- 5
Descripción
## Summary
Both `agent/build.gradle` and `bootstrap-api/build.gradle` (added in #293) contain a `publishing.repositories.maven` block that is never used during the actual release flow. This dead configuration includes hardcoded credential lookups and a legacy Sonatype URL.
## Details
The actual publish path uses the **root-level `nexus-publish-plugin`** (`io.github.gradle-nexus.publish-plugin`), which creates its own `publishToSonatype` task targeting:
```
https://ossrh-staging-api.central.sonatype.com/service/local/
```
Credentials are passed via `-PsonatypeUsername` / `-PsonatypePassword` in the `Makefile`.
However, both subprojects define their own `publishing.repositories.maven` block pointing to a **different, legacy URL**:
```
https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
```
with credentials sourced from `nexusUsername` / `nexusPassword` properties (which are never provided in the Makefile).
This config is dead code — it would only be invoked if someone ran `./gradlew publish` directly instead of `publishToSonatype`, which is not the intended flow. Having it around is confusing and could cause mistakes if someone tries to publish manually.
## Affected files
- `agent/build.gradle` — `publishing.repositories` block (lines ~93-101)
- `bootstrap-api/build.gradle` — `publishing.repositories` block (added in #293)
## Suggestion
Remove the `publishing.repositories.maven` block (and the dead `nexusUsername`/`nexusPassword` credential lookups) from both subproject build files. The nexus-publish-plugin in the root `build.gradle` handles repository configuration for the actual publish flow.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con los bloques publishing.repositories.maven de agent/build.gradle y bootstrap-api/build.gradle; después, compáralos con la configuración de nexus-publish-plugin del build.gradle raíz y con los comandos de publicación del Makefile. Elimina las búsquedas de repositorios y credenciales no utilizadas de ambos subproyectos y verifica que el flujo publishToSonatype documentado siga siendo la ruta de release configurada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- build-system
- Tipo de issue
- Refactorización
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 78/100