protected void deploy()

in src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java [130:155]


    protected void deploy(DeployRequest deployRequest) throws MojoExecutionException {
        int retryFailedDeploymentCounter = Math.max(1, Math.min(10, retryFailedDeploymentCount));
        DeploymentException exception = null;
        for (int count = 0; count < retryFailedDeploymentCounter; count++) {
            try {
                if (count > 0) {
                    getLog().info("Retrying deployment attempt " + (count + 1) + " of " + retryFailedDeploymentCounter);
                }

                repositorySystem.deploy(session.getRepositorySession(), deployRequest);
                exception = null;
                break;
            } catch (DeploymentException e) {
                if (count + 1 < retryFailedDeploymentCounter) {
                    getLog().warn("Encountered issue during deployment: " + e.getLocalizedMessage());
                    getLog().debug(e);
                }
                if (exception == null) {
                    exception = e;
                }
            }
        }
        if (exception != null) {
            throw new MojoExecutionException(exception.getMessage(), exception);
        }
    }