Maven Wagon HTTP Provider Retry Settings for Artifact Deployment
0 reputation · 12 Mar 2024, 04:45 UTC
The goal is to configure the Maven Wagon HTTP provider’s <retryCount> and <backoff> settings so that transient network errors during artifact deployment are retried without causing unintended side‑effects. When deploying to a repository that treats each PUT as a create operation (e.g., a simple filesystem‑based layout), a retry loop may re‑upload the same file multiple times, producing duplicate entries with identical names.
The current documentation does not explicitly state that safe retries depend on the repository providing idempotent PUT semantics, leaving users uncertain whether enabling retries on a non‑idempotent repository will result in duplicate artifacts. This uncertainty creates a decision point about whether to rely on repository‑side overwrite behavior or to limit retries to idempotent targets.
- Does enabling
<retryCount>guarantee that retries are safe only when the repository overwrites existing files? - Should users disable retries when targeting plain directory‑based repositories to avoid duplicate uploads?