Repository navigation
feat(maven): Add maven target to deploy to Maven Central - #258
Conversation
AbhiPrasad
left a comment
There was a problem hiding this comment.
Looks good so far!
We might have to adjust the maven upload command to be a little more configurable but I think that’s a non-issue right now
mavent target to deploy to Maven Centralmaven target to deploy to Maven Central
AbhiPrasad
left a comment
There was a problem hiding this comment.
Last set of comments, will then wait for undraft to finish review
| // Maven central is very flaky, so retrying with an exponential delay in | ||
| // in case it fails. | ||
| await retrySpawnProcess(this.mavenConfig.gradleCliPath, [ | ||
| 'closeAndReleaseRepository', | ||
| ]); |
There was a problem hiding this comment.
right now a Gradle plugin does it (close and promote the releases): https://github.com/vanniktech/gradle-maven-publish-plugin/tree/master/src/main/kotlin/com/vanniktech/maven/publish/nexus
if we do those HTTP requests directly via Craft, we could remove the Gradle plugin for good.
There was a problem hiding this comment.
There's no support for the Gradle plugin yet, it will be supported at a later stage. This is targeting https://github.com/getsentry/sentry-java.
There was a problem hiding this comment.
that's not really related to our sentry android gradle plugin, but rather the graadle plugin that calls closeAndReleaseRepository.
if we replicate what that plugin does via craft, we can eliminate the usage of 3rd party plugins to release our things
There was a problem hiding this comment.
the maven cli does not have the ability to close the repo and promote the releases on sonatype, thats why we use this plugin, otherwise, we'd need to do it manually.
There was a problem hiding this comment.
Added a TODO, we can address this later.
BYK
left a comment
There was a problem hiding this comment.
We should probably add a todo somewhere about updating the Docker image to include the necessary binaries?
The goal of the `symbol-collector` target is to continue automating the release of [`sentry-java`](https://github.com/getsentry/sentry-java) (Android and Java). #258 automated publishing to Maven Central, and this PR automates uploading symbols to the Android Bucket.
Mitigate the two open Dependabot alerts with pnpm dependency patches. Neither advisory currently identifies a fixed upstream release, and `http-cache-semantics@4.3.0` still reproduces the reported cache-reuse flaw. - [Alert #258 / GHSA-vfj7-8cjw-p6xm](https://github.com/getsentry/craft/security/dependabot/258): bound `braces@3.0.3` AST nesting to 100 levels, counting both parentheses and braces. This protects both the runtime Vercel/micromatch dependency and the Sentry build plugin's watcher. Escaped, quoted, and character-class literals retain their behavior. - [Alert #252 / GHSA-ch52-4w7c-c8xp](https://github.com/getsentry/craft/security/dependabot/252): update the docs dependency to 4.3.0 and share a reuse guard across request evaluation, expiry, TTL (used directly by Astro), and stale fallback APIs. Neither client `max-stale`, `stale-while-revalidate`, nor `stale-if-error` can override non-storable, `no-cache`, shared-cookie, shared `proxy-revalidate`, or wildcard `Vary` restrictions. `must-revalidate` retains its fresh lifetime without stale extensions. Error fallback also checks URL, host, method, and `Vary` identity before reusing a response. Ordinary expiry and explicitly public/private-cache cookie behavior remain supported. Add six root regressions and thirty-three docs regressions, including Astro's actual remote-image loader against the actual transitive packages. The docs build runs its regressions, and Docker copies the root patch before its frozen install. Patch provenance and removal criteria are documented in `patches/README.md`. Authenticate Changelog Preview release discovery with the workflow token through `gh api`, avoiding the unauthenticated 403 that blocked CI. Add three installer regressions covering latest, missing-tag fallback, and explicit tags; asset downloads do not receive authorization headers. Validation: reproduced the unsafe behavior before patching; all 39 security regressions pass afterward. Root and docs frozen installs pass with CI's pnpm 10.27.0. Type checking, lint, formatting, CLI build/`--help`, and the 29-page docs build pass. Docs audit reports zero vulnerabilities. Local root-suite baseline (`TZ=UTC pnpm test`): 1,561 passed, 3 skipped, 3 failed. The same failures reproduced on unmodified master on macOS: Action test `uses the full workspace path in publish request titles`, and dry-run E2E tests `produces consistent output format` (temporary-path snapshot) and `executes pre-release command and shows diff of changes` (GNU/BSD sed). Docker could not be built locally because no daemon is running; hosted checks cover it. The root audit still reports the locally patched `braces@3.0.3` by version. Dependabot may keep #258 open until an upstream fixed release exists; this PR does not suppress or dismiss the alert. These are local mitigations, not a claim that upstream packages or every version-based scan are fixed.
The goal of the new
maventarget is to automate the publishing ofsentry-java(Android and Java) to Maven Central.