/** * Creates a new exception with the specified repository and cause. * * @param repository The remote repository whose content type is not supported, may be {@code null}. * @param cause The exception that caused this one, may be {@code null}. */ public NoRepositoryConnectorException( RemoteRepository repository, Throwable cause ) { this( repository, toMessage( repository ), cause ); }
public RepositoryConnector newInstance( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { if ( "file".equalsIgnoreCase( repository.getProtocol() ) ) { FileRepositoryConnector connector = new FileRepositoryConnector( session, repository, fileProcessor, logger ); return connector; } throw new NoRepositoryConnectorException( repository ); }
throw new DeploymentException( "Failed to deploy artifacts/metadata: " + e.getMessage(), e );
public AetherRepositoryConnector(RemoteRepository repository, RepositorySystemSession session, FileProcessor fileProcessor, SSLSocketFactory sslSocketFactory) throws NoRepositoryConnectorException { // // Right now this only support a Maven layout which is what we mean by type // if (!"default".equals(repository.getContentType())) { throw new NoRepositoryConnectorException(repository); } if (!repository.getProtocol().regionMatches(true, 0, "http", 0, "http".length())) { throw new NoRepositoryConnectorException(repository); } //this.logger = logger; this.repository = repository; this.fileProcessor = fileProcessor; this.session = session; try { this.layout = new Maven2RepositoryLayoutFactory().newInstance(session, repository); } catch (NoRepositoryLayoutException e) { throw new NoRepositoryConnectorException(repository, e); } this.aetherClient = newAetherClient(repository, session, sslSocketFactory); }
throw new DeploymentException( "Failed to deploy artifacts/metadata: " + e.getMessage(), e );
public FileRepositoryConnector( RepositorySystemSession session, RemoteRepository repository, FileProcessor fileProcessor, Logger logger ) throws NoRepositoryConnectorException { if ( !"default".equals( repository.getContentType() ) ) { throw new NoRepositoryConnectorException( repository ); } this.session = session; this.repository = repository; this.fileProcessor = fileProcessor; this.logger = logger; initExecutor( session.getConfigProperties() ); }
/** * Creates a new exception with the specified repository. * * @param repository The remote repository whose content type is not supported, may be {@code null}. */ public NoRepositoryConnectorException( RemoteRepository repository ) { this( repository, toMessage( repository ) ); }
throw new NoRepositoryConnectorException( repository, buffer.toString(), errors.size() == 1 ? errors.get( 0 ) : null );
/** * Creates a new exception with the specified repository. * * @param repository The remote repository whose content type is not supported, may be {@code null}. */ public NoRepositoryConnectorException( RemoteRepository repository ) { this( repository, toMessage( repository ) ); }
throw new NoRepositoryConnectorException( repository, buffer.toString(), errors.size() == 1 ? errors.get( 0 ) : null );
/** * Creates a new exception with the specified repository and cause. * * @param repository The remote repository whose content type is not supported, may be {@code null}. * @param cause The exception that caused this one, may be {@code null}. */ public NoRepositoryConnectorException( RemoteRepository repository, Throwable cause ) { this( repository, toMessage( repository ), cause ); }
throw new NoRepositoryConnectorException( repository ); if ( wagonHint == null || wagonHint.length() <= 0 ) throw new NoRepositoryConnectorException( repository ); throw new NoRepositoryConnectorException( repository );
public RepositoryConnector newInstance(RepositorySystemSession repositorySystemSession, RemoteRepository remoteRepository) throws NoRepositoryConnectorException { if (!LAYOUT_DEFAULT.equals(remoteRepository.getContentType())) { throw new NoRepositoryConnectorException(remoteRepository); } ConnectorKey key = new ConnectorKey(remoteRepository); RepositoryConnector connector = (RepositoryConnector) repositorySystemSession.getData().get(key); if (connector == null) { connector = new AetherRepositoryConnector(remoteRepository, repositorySystemSession, fileProcessor, sslSocketFactory); if (!repositorySystemSession.getData().set(key, null, connector)) { connector = (RepositoryConnector) repositorySystemSession.getData().get(key); } } return connector; }
throw new NoRepositoryConnectorException( repository, e.getMessage(), e ); throw new NoRepositoryConnectorException( repository, e.getMessage(), e );
throw new NoRepositoryConnectorException( repository, e.getMessage(), e ); throw new NoRepositoryConnectorException( repository, e.getMessage(), e );