in src/main/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojo.java [414:428]
void waitAfterFailure(int attempt, Duration maxRetryDelay, Sleeper sleeper) throws MojoExecutionException {
// Use attempt as exponent in the exponential function, but limit it to avoid too big values.
int exponentAttempt = Math.min(attempt, MAX_WAIT_EXPONENT_ATTEMPT);
long delayMillis = (long) (Duration.ofSeconds(1).toMillis() * Math.pow(2, exponentAttempt));
delayMillis = Math.min(delayMillis, maxRetryDelay.toMillis());
if (delayMillis > 0) {
getLog().info("Sleeping after failed attempt for " + (delayMillis / 1000) + " seconds...");
try {
sleeper.sleep(delayMillis);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new MojoExecutionException("Thread interrupted while waiting after failure", e);
}
}
}