if ( !previousExceptions.containsKey( content.getId() ) ) content.getId(), exception ); previousExceptions.remove( content.getId() ); content.getRepository().getId(), Keys.toKey( artifact ), exception.getMessage() ); log.debug( "Full stack trace", exception );
log.debug( "Retrieving {} from {}", remotePath, remoteRepository.getRepository().getName() ); wagon.get( addParameters( remotePath, remoteRepository.getRepository() ), destFile.toFile() ); success = true; log.debug( "Retrieving {} from {} if updated", remotePath, remoteRepository.getRepository().getName() ); try success = wagon.getIfNewer( addParameters( remotePath, remoteRepository.getRepository() ), destFile.toFile(), Files.getLastModifiedTime(origFile).toMillis()); "Resource [" + remoteRepository.getURL() + "/" + remotePath + "] does not exist: " + e.getMessage(), e ); "Download failure on resource [" + remoteRepository.getURL() + "/" + remotePath + "]:" + e.getMessage(); if ( e.getCause() != null )
public RemoteRepositoryContent getRemoteRepositoryContent( RemoteRepository mRepo ) throws RepositoryException { final String id = mRepo.getId(); RemoteRepositoryContent content = remoteContentMap.get( id ); if ( content != null && content.getRepository()==mRepo) { return content; } RepositoryContentProvider contentProvider = getProvider( mRepo.getLayout( ), mRepo.getType( ) ); content = contentProvider.createRemoteContent( mRepo ); if (content==null) { throw new RepositoryException( "Could not create repository content instance for "+mRepo.getId() ); } RemoteRepositoryContent previousContent = remoteContentMap.put( id, content ); if (previousContent!=null) { previousContent.setRepository( null ); } return content; }
+ " to connect to remote repository " + remoteRepository.getURL(); if ( networkProxy.getNonProxyHosts() != null ) String username = remoteRepository.getRepository().getUserName(); String password = remoteRepository.getRepository().getPassword(); log.debug( "Using username {} to connect to remote repository {}", username, remoteRepository.getURL() ); authInfo = new AuthenticationInfo(); authInfo.setUserName( username ); long timeoutInMilliseconds = TimeUnit.MILLISECONDS.convert( remoteRepository.getRepository().getTimeout(), // TimeUnit.SECONDS ); new Repository( remoteRepository.getId(), remoteRepository.getURL().toString() ); wagon.connect( wagonRepository, authInfo, networkProxy ); connected = true; log.warn( "Could not connect to {}: {}", remoteRepository.getRepository().getName(), e.getMessage() ); connected = false;
requestProperties.setProperty( "remoteRepositoryId", targetRepository.getId() ); String targetPath = targetRepository.toPath( artifact ); targetRepository.getRepository().getId() ); targetRepository.getRepository().getId() );
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( "ProxyConnector[\n" ); sb.append( " source: [managed] " ).append( this.sourceRepository.getRepoRoot() ).append( "\n" ); sb.append( " target: [remote] " ).append( this.targetRepository.getRepository().getLocation() ).append( "\n" ); sb.append( " proxyId:" ).append( this.proxyId ).append( "\n" ); Iterator<String> keys = this.policies.keySet().iterator(); while ( keys.hasNext() ) { String name = keys.next(); sb.append( " policy[" ).append( name ).append( "]:" ); sb.append( this.policies.get( name ) ).append( "\n" ); } sb.append( "]" ); return sb.toString(); }
/** * Adjusts a path for a metadata.xml file to its repository specific path. * * @param repository the repository to base new path off of. * @param path the path to the metadata.xml file to adjust the name of. * @return the newly adjusted path reference to the repository specific metadata path. */ public String getRepositorySpecificName( RemoteRepositoryContent repository, String path ) { return getRepositorySpecificName( repository.getId(), path ); }
throws ProxyException String url = remoteRepository.getURL().getUrl() + remotePath + ext;
+ " to connect to remote repository " + remoteRepository.getURL(); if ( networkProxy.getNonProxyHosts() != null ) String username = ""; String password = ""; RepositoryCredentials repCred = remoteRepository.getRepository().getLoginCredentials(); if (repCred!=null && repCred instanceof PasswordCredentials) { PasswordCredentials pwdCred = (PasswordCredentials) repCred; log.debug( "Using username {} to connect to remote repository {}", username, remoteRepository.getURL() ); authInfo = new AuthenticationInfo(); authInfo.setUserName( username ); long timeoutInMilliseconds = remoteRepository.getRepository().getTimeout().toMillis(); new Repository( remoteRepository.getId(), remoteRepository.getURL().toString() ); wagon.connect( wagonRepository, authInfo, networkProxy ); connected = true; log.warn( "Could not connect to {}: {}", remoteRepository.getRepository().getName(), e.getMessage() ); connected = false;
requestProperties.setProperty( "remoteRepositoryId", targetRepository.getId() ); String targetPath = targetRepository.toPath( artifact ); targetRepository.getRepository().getId() ); targetRepository.getRepository().getId() );
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( "ProxyConnector[\n" ); sb.append( " source: [managed] " ).append( this.sourceRepository.getRepoRoot() ).append( "\n" ); sb.append( " target: [remote] " ).append( this.targetRepository.getRepository().getUrl() ).append( "\n" ); sb.append( " proxyId:" ).append( this.proxyId ).append( "\n" ); Iterator<String> keys = this.policies.keySet().iterator(); while ( keys.hasNext() ) { String name = keys.next(); sb.append( " policy[" ).append( name ).append( "]:" ); sb.append( this.policies.get( name ) ).append( "\n" ); } sb.append( "]" ); return sb.toString(); }
connector.getTargetRepository().getId(), allProxyConnectorRuleConfigurations );
throws ProxyException String url = remoteRepository.getURL().getUrl() + remotePath + ext;
if ( !previousExceptions.containsKey( content.getId() ) ) content.getId(), exception ); previousExceptions.remove( content.getId() ); content.getRepository().getId(), Keys.toKey( artifact ), exception.getMessage() ); log.debug( "Full stack trace", exception );
log.debug( "Retrieving {} from {}", remotePath, remoteRepository.getRepository().getName() ); wagon.get( addParameters( remotePath, remoteRepository.getRepository() ), destFile ); success = true; log.debug( "Retrieving {} from {} if updated", remotePath, remoteRepository.getRepository().getName() ); success = wagon.getIfNewer( addParameters( remotePath, remoteRepository.getRepository() ), destFile, origFile.lastModified() ); if ( !success ) "Resource [" + remoteRepository.getURL() + "/" + remotePath + "] does not exist: " + e.getMessage(), e ); "Download failure on resource [" + remoteRepository.getURL() + "/" + remotePath + "]:" + e.getMessage(); if ( e.getCause() != null )
targetRepository.getRepository().getId(), e ); targetRepository.getRepository().getId(), e ); targetRepository.getRepository().getId(), logicalPath, e.getMessage() ); log.debug( "Full stack trace", e );
connector.getTargetRepository().getId(), allProxyConnectorRuleConfigurations );
requestProperties.setProperty( "remoteRepositoryId", targetRepository.getId() ); targetRepository.getRepository().getId() ); targetRepository.getRepository().getId() ); targetRepository.getRepository().getId(), path, e.getMessage() ); log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ), "Transfer error from repository \"{}" + "\" for resource {}, continuing to next repository. Error message: {}", targetRepository.getRepository().getId(), path, e.getMessage(), e ); targetRepository.getRepository().getId(), path, e.getMessage(), e ); log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ), "Full stack trace", e );
throws ProxyException, NotModifiedException, RepositoryAdminException String url = remoteRepository.getURL().getUrl(); if ( !url.endsWith( "/" ) ) remotePath, remoteRepository.getRepository().getName() ); return null; remoteRepository.getRepository().getName() ); return null;
targetRepository.getRepository().getId(), e ); targetRepository.getRepository().getId(), e ); targetRepository.getRepository().getId(), logicalPath, e.getMessage() ); log.debug( "Full stack trace", e );