public static int repositoriesHashCode( List<RemoteRepository> repositories ) { int result = 17; for ( RemoteRepository repository : repositories ) { result = 31 * result + repositoryHashCode( repository ); } return result; }
public MojoFailureException getMojoFailureException() { return (MojoFailureException) getCause(); }
public static ArtifactTypeRegistry newArtifactTypeRegistry( ArtifactHandlerManager handlerManager ) { return new MavenArtifactTypeRegistry( handlerManager ); }
public void setRemoteArtifactRepositories( List<ArtifactRepository> remoteArtifactRepositories ) { this.remoteArtifactRepositories = remoteArtifactRepositories; this.remoteProjectRepositories = RepositoryUtils.toRepos( getRemoteArtifactRepositories() ); }
public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ) { return delegate.pathOf( RepositoryUtils.toArtifact( artifact ) ); }
private static org.apache.maven.artifact.Artifact toArtifact( Dependency dependency ) { if ( dependency == null ) { return null; } org.apache.maven.artifact.Artifact result = toArtifact( dependency.getArtifact() ); result.setScope( dependency.getScope() ); result.setOptional( dependency.isOptional() ); return result; }
InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool, ReactorModelCache modelCache ) { this.request = request; this.modelPool = modelPool; this.modelCache = modelCache; session = LegacyLocalRepositoryManager.overlay( request.getLocalRepository(), request.getRepositorySession(), repoSystem ); repositories = RepositoryUtils.toRepos( request.getRemoteRepositories() ); }
public void setPluginArtifactRepositories( List<ArtifactRepository> pluginArtifactRepositories ) { this.pluginArtifactRepositories = pluginArtifactRepositories; this.remotePluginRepositories = RepositoryUtils.toRepos( getPluginArtifactRepositories() ); }
public ArtifactType get( String stereotypeId ) { ArtifactHandler handler = handlerManager.getArtifactHandler( stereotypeId ); return newArtifactType( stereotypeId, handler ); }
public static Collection<Artifact> toArtifacts( Collection<org.apache.maven.artifact.Artifact> artifactsToConvert ) { List<Artifact> artifacts = new ArrayList<>(); for ( org.apache.maven.artifact.Artifact a : artifactsToConvert ) { artifacts.add( toArtifact( a ) ); } return artifacts; }
private List<org.eclipse.aether.artifact.Artifact> toAetherArtifacts( final List<Artifact> pluginArtifacts ) { return new ArrayList<>( RepositoryUtils.toArtifacts( pluginArtifacts ) ); }
/** * Returns the artifact filter for the core + extension artifacts. * * @see org.apache.maven.ArtifactFilterManager#getArtifactFilter() */ public ArtifactFilter getArtifactFilter() { Set<String> excludes = new LinkedHashSet<>( getExcludedArtifacts() ); for ( ArtifactFilterManagerDelegate delegate : delegates ) { delegate.addExcludes( excludes ); } return new ExclusionSetFilter( excludes ); }
public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, MavenSession session ) throws ArtifactResolutionException, ArtifactNotFoundException { Set<MavenProject> mavenProjects = Collections.singleton( project ); return resolveImpl( mavenProjects, scopesToCollect, scopesToResolve, session, getIgnorableArtifacts( mavenProjects ) ); }
/** * Returns the artifact filter for the standard core artifacts. * * @see org.apache.maven.ArtifactFilterManager#getCoreArtifactFilter() */ public ArtifactFilter getCoreArtifactFilter() { return new ExclusionSetFilter( getCoreArtifactExcludes() ); }
public Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts ) throws ArtifactResolutionException, ArtifactNotFoundException { return resolveImpl( Collections.singleton( project ), scopesToCollect, scopesToResolve, session, getIgnorableArtifacts( ignoreableArtifacts ) ); }
public Set<String> getCoreArtifactExcludes() { Set<String> excludes = new LinkedHashSet<>( coreArtifacts ); for ( ArtifactFilterManagerDelegate delegate : delegates ) { delegate.addCoreExcludes( excludes ); } return excludes; }
public void excludeArtifact( String artifactId ) { getExcludedArtifacts().add( artifactId ); }
private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 ) { if ( r1 == r2 ) { return true; } return Objects.equals( r1.getId(), r2.getId() ) && Objects.equals( r1.getUrl(), r2.getUrl() ) && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) ) && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) ); } }
public String getPathForLocalArtifact( Artifact artifact ) { if ( realLocalRepo ) { return delegate.pathOf( RepositoryUtils.toArtifact( artifact.setVersion( artifact.getBaseVersion() ) ) ); } return delegate.pathOf( RepositoryUtils.toArtifact( artifact ) ); }
private List<org.eclipse.aether.artifact.Artifact> toAetherArtifacts( final List<Artifact> pluginArtifacts ) { return new ArrayList<>( RepositoryUtils.toArtifacts( pluginArtifacts ) ); }