Skip to content

ci: add retry logic for Maven Central 403 errors#41

Merged
saurabhjain1592 merged 1 commit into
mainfrom
fix/maven-central-403-retry
Jan 6, 2026
Merged

ci: add retry logic for Maven Central 403 errors#41
saurabhjain1592 merged 1 commit into
mainfrom
fix/maven-central-403-retry

Conversation

@saurabhjain1592

Copy link
Copy Markdown
Member

Summary

  • Add retry loops (3 attempts with 30-60s delays) to all Maven commands
  • Add -U flag to force updates and bypass cached failures
  • Remove Maven cache from setup-java (caching was contributing to issues)
  • Add explicit settings.xml configuration for credentials

Problem

GitHub Actions runners are intermittently getting 403 Forbidden errors from Maven Central (repo.maven.apache.org). This appears to be rate limiting or IP blocking from Maven Central's side.

Solution

  1. Retry logic: Each Maven command now retries up to 3 times with delays between attempts
  2. Force updates: Added -U flag to force Maven to check for updates
  3. No caching: Removed Maven cache from setup-java action to avoid stale cached data
  4. Explicit settings: Added settings.xml configuration inline

Test Plan

  • Trigger release workflow with new tag
  • Verify retry logic works on transient failures

- Add retry loops (3 attempts with 30-60s delays) to all Maven commands
- Add -U flag to force updates and bypass cached failures
- Configure repo1.maven.org mirror to bypass repo.maven.apache.org blocks
- Remove Maven cache from setup-java (caching was contributing to issues)

This fixes persistent 403 Forbidden errors from Maven Central that
block GitHub Actions from downloading plugins and dependencies.
@saurabhjain1592 saurabhjain1592 force-pushed the fix/maven-central-403-retry branch from 813d2c1 to 25bda7e Compare January 6, 2026 14:34
@saurabhjain1592 saurabhjain1592 merged commit 9cad672 into main Jan 6, 2026
9 checks passed
saurabhjain1592 added a commit that referenced this pull request Jan 6, 2026
- Add retry loops (3 attempts with 30-60s delays) to all Maven commands
- Add -U flag to force updates and bypass cached failures
- Configure repo1.maven.org mirror to bypass repo.maven.apache.org blocks
- Remove Maven cache from setup-java (caching was contributing to issues)

This fixes persistent 403 Forbidden errors from Maven Central that
block GitHub Actions from downloading plugins and dependencies.
@saurabhjain1592 saurabhjain1592 deleted the fix/maven-central-403-retry branch January 11, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant