private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact ) { /* * The workspace/reactor is in flux so we better not assume definitive information for any of its * artifacts/projects. */ WorkspaceReader workspace = session.getWorkspaceReader(); if ( workspace == null ) { return true; } Artifact pomArtifact = ArtifactDescriptorUtils.toPomArtifact( artifact ); return workspace.findArtifact( pomArtifact ) == null; }
if ( workspace != null ) List<String> versions = workspace.findVersions( request.getArtifact() ); for ( String version : versions ) versionIndex.put( version, workspace.getRepository() );
public static WorkspaceRepository getWorkspace( RepositorySystemSession session ) { WorkspaceReader reader = session.getWorkspaceReader(); return ( reader != null ) ? reader.getRepository() : null; }
File file = workspace.findArtifact( artifact ); if ( file != null ) result.setRepository( workspace.getRepository() ); artifactResolved( session, trace, artifact, result.getRepository(), null ); continue;
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 ) ); }
public Key( List<WorkspaceReader> readers ) { for ( WorkspaceReader reader : readers ) { keys.add( reader.getRepository().getKey() ); } }
File file = workspace.findArtifact( artifact ); if ( file != null ) result.setRepository( workspace.getRepository() ); artifactResolved( session, trace, artifact, result.getRepository(), null ); continue;
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 ) ); }
if ( workspace != null && workspace.findVersions( artifact ).contains( version ) ) result.setRepository( workspace.getRepository() );
public File findArtifact( Artifact artifact ) { File file = null; for ( WorkspaceReader reader : readers ) { file = reader.findArtifact( artifact ); if ( file != null ) { break; } } return file; }
Key( List<WorkspaceReader> readers ) { for ( WorkspaceReader reader : readers ) { keys.add( reader.getRepository().getKey() ); } }
if ( workspace != null ) List<String> versions = workspace.findVersions( request.getArtifact() ); for ( String version : versions ) versionIndex.put( version, workspace.getRepository() );
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; }
if ( workspace != null ) List<String> versions = workspace.findVersions( request.getArtifact() ); for ( String version : versions ) versionIndex.put( version, workspace.getRepository() );
@Override public File resolve(String groupId, String artifactId, String classifier, String extension, String version) throws IOException { File file = reactor.findArtifact(new DefaultArtifact(groupId, artifactId, classifier, extension, version)); return file == null ? fallback.resolve(String.format("mvn:%s/%s/%s/%s/%s", groupId, artifactId, version, extension, classifier)) : file; }
public static WorkspaceRepository getWorkspace( RepositorySystemSession session ) { WorkspaceReader reader = session.getWorkspaceReader(); return ( reader != null ) ? reader.getRepository() : null; }
if ( workspace != null ) List<String> versions = workspace.findVersions( request.getArtifact() ); for ( String version : versions ) versionIndex.put( version, workspace.getRepository() );
@Override public File resolve(String groupId, String artifactId, String classifier, String extension, String version, Exception previousException) throws IOException { File file = reactor.findArtifact(new DefaultArtifact(groupId, artifactId, classifier, extension, version)); return file == null ? fallback.resolve(String.format("mvn:%s/%s/%s/%s/%s", groupId, artifactId, version, extension, classifier), previousException) : file; }
public static WorkspaceRepository getWorkspace( RepositorySystemSession session ) { WorkspaceReader reader = session.getWorkspaceReader(); return ( reader != null ) ? reader.getRepository() : null; }