public File findArtifact( Artifact artifact ) { File file = null; for ( WorkspaceReader reader : readers ) { file = reader.findArtifact( artifact ); if ( file != null ) { break; } } return file; }
public static WorkspaceRepository getWorkspace( RepositorySystemSession session ) { WorkspaceReader reader = session.getWorkspaceReader(); return ( reader != null ) ? reader.getRepository() : null; }
public List<String> findVersions( Artifact artifact ) { Collection<String> versions = new LinkedHashSet<String>(); for ( WorkspaceReader reader : readers ) { versions.addAll( reader.findVersions( artifact ) ); } return Collections.unmodifiableList( new ArrayList<String>( versions ) ); }
File file = workspace.findArtifact( artifact ); if ( file != null ) result.setRepository( workspace.getRepository() ); artifactResolved( session, trace, artifact, result.getRepository(), null ); continue;
File file = workspace.findArtifact( artifact ); if ( file != null ) result.setRepository( workspace.getRepository() ); artifactResolved( session, trace, artifact, result.getRepository(), null ); continue;
public static WorkspaceRepository getWorkspace( RepositorySystemSession session ) { WorkspaceReader reader = session.getWorkspaceReader(); return ( reader != null ) ? reader.getRepository() : null; }
public Key( List<WorkspaceReader> readers ) { for ( WorkspaceReader reader : readers ) { keys.add( reader.getRepository().getKey() ); } }
/** * Creates a new workspace reader by chaining the specified readers. * * @param readers The readers to chain, may be {@code null}. * @see #newInstance(WorkspaceReader, WorkspaceReader) */ public ChainedWorkspaceReader( WorkspaceReader... readers ) { if ( readers != null ) { Collections.addAll( this.readers, readers ); } StringBuilder buffer = new StringBuilder(); for ( WorkspaceReader reader : readers ) { if ( buffer.length() > 0 ) { buffer.append( '+' ); } buffer.append( reader.getRepository().getContentType() ); } repository = new WorkspaceRepository( buffer.toString(), new Key( this.readers ) ); }
public static ArtifactRepository getRepository( RepositorySystemSession session, List<RemoteRepository> repositories, Class<?> repoClass, String repoId ) { if ( repoClass != null ) { if ( WorkspaceRepository.class.isAssignableFrom( repoClass ) ) { return session.getWorkspaceReader().getRepository(); } else if ( LocalRepository.class.isAssignableFrom( repoClass ) ) { return session.getLocalRepository(); } else { for ( RemoteRepository repository : repositories ) { if ( repoId.equals( repository.getId() ) ) { return repository; } } } } return null; }
public static ArtifactRepository getRepository( RepositorySystemSession session, List<RemoteRepository> repositories, Class<?> repoClass, String repoId ) { if ( repoClass != null ) { if ( WorkspaceRepository.class.isAssignableFrom( repoClass ) ) { return session.getWorkspaceReader().getRepository(); } else if ( LocalRepository.class.isAssignableFrom( repoClass ) ) { return session.getLocalRepository(); } else { for ( RemoteRepository repository : repositories ) { if ( repoId.equals( repository.getId() ) ) { return repository; } } } } return null; }