log.error("Remote staging finished with a failure: {}", e.getMessage()); log.error(""); log.error("Possible causes of 403 Forbidden:"); log.error( " * you have no permissions to stage against profile with ID \"{}\"? Get to Nexus admin...", profileId); throw new ArtifactDeploymentException("Remote staging failed: " + e.getMessage(), e);
public NexusClientAccessForbiddenException convertIf403( final UniformInterfaceException e ) { final ClientResponse response = e.getResponse(); if ( ClientResponse.Status.FORBIDDEN.equals( response.getClientResponseStatus() ) ) { return new NexusClientAccessForbiddenException( getMessageIfPresent( ClientResponse.Status.FORBIDDEN.getStatusCode(), e ), response.getClientResponseStatus().getReasonPhrase(), getResponseBody( response ) ); } return null; }