private ArtifactTransferException newException(String error, Artifact artifact, RemoteRepository repository) { if (error == null || error.length() <= 0) { return new ArtifactNotFoundException(artifact, repository, "Failure to find " + artifact + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced"); } else { return new ArtifactTransferException(artifact, repository, "Failure to transfer " + artifact + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error); } }
private ArtifactTransferException newException(String error, Artifact artifact, RemoteRepository repository) { if (error == null || error.length() <= 0) { return new ArtifactNotFoundException(artifact, repository, "Failure to find " + artifact + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced"); } else { return new ArtifactTransferException(artifact, repository, "Failure to transfer " + artifact + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error); } }
private ArtifactTransferException newException( String error, Artifact artifact, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new ArtifactNotFoundException( artifact, repository, "Failure to find " + artifact + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced", true ); } else { return new ArtifactTransferException( artifact, repository, "Failure to transfer " + artifact + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error, true ); } }
private ArtifactTransferException newException( String error, Artifact artifact, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new ArtifactNotFoundException( artifact, repository, "Failure to find " + artifact + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced", true ); } else { return new ArtifactTransferException( artifact, repository, "Failure to transfer " + artifact + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error, true ); } }
public Exception wrap( ArtifactTransfer transfer, Exception e, RemoteRepository repository ) { ArtifactTransferException ex = null; e = WagonCancelledException.unwrap( e ); if ( e instanceof ResourceDoesNotExistException ) { ex = new ArtifactNotFoundException( transfer.getArtifact(), repository ); } else if ( e != null ) { ex = new ArtifactTransferException( transfer.getArtifact(), repository, e ); } transfer.setException( ex ); return ex; }
@Override public void transferFailed( Exception exception, int classification ) { ArtifactTransferException e; if ( classification == Transporter.ERROR_NOT_FOUND ) { e = new ArtifactNotFoundException( getTransfer().getArtifact(), repository ); } else { e = new ArtifactTransferException( getTransfer().getArtifact(), repository, exception ); } getTransfer().setException( e ); super.transferFailed( e, classification ); }
@Override public void transferFailed( Exception exception, int classification ) { ArtifactTransferException e; if ( classification == Transporter.ERROR_NOT_FOUND ) { e = new ArtifactNotFoundException( getTransfer().getArtifact(), repository ); } else { e = new ArtifactTransferException( getTransfer().getArtifact(), repository, exception ); } getTransfer().setException( e ); super.transferFailed( e, classification ); }
if ( Direction.DOWNLOAD.equals( direction ) ) artEx = new ArtifactNotFoundException( transfer.getArtifact(), repository );
result.addException( new ArtifactNotFoundException( artifact, null ) ); new ArtifactNotFoundException( artifact, repo, "Cannot access " + repo.getId() + " (" + repo.getUrl() + ") in offline mode and the artifact " + artifact + " has not been downloaded from it before.", e ); if ( result.getExceptions().isEmpty() ) Exception exception = new ArtifactNotFoundException( request.getArtifact(), null ); result.addException( exception );
result.addException( new ArtifactNotFoundException( artifact, null ) ); new ArtifactNotFoundException( artifact, repo, "Cannot access " + repo.getId() + " (" + repo.getUrl() + ") in offline mode and the artifact " + artifact + " has not been downloaded from it before.", e ); if ( result.getExceptions().isEmpty() ) Exception exception = new ArtifactNotFoundException( request.getArtifact(), null ); result.addException( exception );