Clean up dead publishing repository config and credentials in subproject build files

Open Beginner friendly
#294 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start with the publishing.repositories.maven blocks in agent/build.gradle and bootstrap-api/build.gradle, then compare them with the root build.gradle nexus-publish-plugin configuration and the Makefile publish commands. Remove the unused repository and credential lookups from both subprojects, and verify that the documented publishToSonatype flow remains the configured release path.

Written by the indexing model from the issue text.

Description

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.gradlepublishing.repositories block (lines ~93-101)
  • bootstrap-api/build.gradlepublishing.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.

Dominant language
Java
Stars
125
Forks
48
Avg merge
1h 8m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from grafana/pyroscope-java

All issues in grafana/pyroscope-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.