Examples of DependencyFilter


Examples of org.sonatype.aether.graph.DependencyFilter

        if ( pluginArtifact == null )
        {
            pluginArtifact = toArtifact( plugin, session );
        }

        DependencyFilter collectionFilter = new ScopeDependencyFilter( "provided", "test" );

        DependencyFilter resolutionFilter =
            new ExclusionsDependencyFilter( artifactFilterManager.getCoreArtifactExcludes() );
        resolutionFilter = AndDependencyFilter.newInstance( resolutionFilter, dependencyFilter );
        resolutionFilter = new AndDependencyFilter( collectionFilter, resolutionFilter );

        DependencyNode node;
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

            throw new IllegalArgumentException( "incomplete plugin descriptor, plugin artifact missing" );
        }

        MavenProject project = session.getCurrentProject();

        DependencyFilter dependencyFilter = project.getExtensionDependencyFilter();
        dependencyFilter = AndDependencyFilter.newInstance( dependencyFilter, filter );

        DependencyNode root =
            pluginDependenciesResolver.resolve( plugin, RepositoryUtils.toArtifact( pluginArtifact ), dependencyFilter,
                                                project.getRemotePluginRepositories(), session.getRepositorySession() );
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

                {
                    projectRealm.importFrom( extensionRealm, export );
                }
            }

            DependencyFilter extensionArtifactFilter = null;
            if ( !exclusions.isEmpty() )
            {
                extensionArtifactFilter = new ExclusionsDependencyFilter( exclusions );
            }
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

    {
        DefaultDependencyResolutionResult result = new DefaultDependencyResolutionResult();

        MavenProject project = request.getMavenProject();
        RepositorySystemSession session = request.getRepositorySession();
        DependencyFilter filter = request.getResolutionFilter();

        ArtifactTypeRegistry stereotypes = session.getArtifactTypeRegistry();

        CollectRequest collect = new CollectRequest();
        collect.setRequestContext( "project" );
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

        }

        scopesToCollect = new HashSet<String>( scopesToCollect );
        scopesToCollect.addAll( scopesToResolve );

        DependencyFilter collectionFilter = new ScopeDependencyFilter( null, negate( scopesToCollect ) );
        DependencyFilter resolutionFilter = new ScopeDependencyFilter( null, negate( scopesToResolve ) );
        resolutionFilter = AndDependencyFilter.newInstance( collectionFilter, resolutionFilter );
        resolutionFilter =
            AndDependencyFilter.newInstance( resolutionFilter, new ReactorDependencyFilter( projectArtifacts ) );

        DependencyResolutionResult result;
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

        if ( pluginArtifact == null )
        {
            pluginArtifact = toArtifact( plugin, session );
        }

        DependencyFilter collectionFilter = new ScopeDependencyFilter( "provided", "test" );

        DependencyFilter resolutionFilter =
            new ExclusionsDependencyFilter( artifactFilterManager.getCoreArtifactExcludes() );
        resolutionFilter = AndDependencyFilter.newInstance( resolutionFilter, dependencyFilter );
        resolutionFilter = new AndDependencyFilter( collectionFilter, resolutionFilter );

        DependencyNode node;
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

            throw new IllegalArgumentException( "incomplete plugin descriptor, plugin artifact missing" );
        }

        MavenProject project = session.getCurrentProject();

        DependencyFilter dependencyFilter = project.getExtensionDependencyFilter();
        dependencyFilter = AndDependencyFilter.newInstance( dependencyFilter, filter );

        DependencyNode root =
            pluginDependenciesResolver.resolve( plugin, RepositoryUtils.toArtifact( pluginArtifact ), dependencyFilter,
                                                project.getRemotePluginRepositories(), session.getRepositorySession() );
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

    /**
     * Resolves dependencies transitively from the given jar artifact, with the specified Maven scope
     * (compile, runtime, and so on.)
     */
    public DependencyResult resolveDependencies(GAV a, String scope) throws DependencyResolutionException {
        DependencyFilter classpathFlter = DependencyFilterUtils.classpathFilter(scope);

        CollectRequest collectRequest = new CollectRequest();
        collectRequest.setRoot(new Dependency(new DefaultArtifact(a.toString()), JavaScopes.COMPILE));
        collectRequest.setRepositories(remoteRepositories);

View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

     * I have no idea. That's why this workaround. Sometime later we should
     * do a proper testing and reproduce this defect in a test.
     */
    public DependencyResult resolve(@Nonnull final Artifact root,
                                    @Nonnull final String scope) throws DependencyResolutionException {
        final DependencyFilter filter =
            DependencyFilterUtils.classpathFilter(scope);

        if (filter == null) {
            throw new IllegalStateException(
                String.format("failed to create a filter for '%s'", scope)
View Full Code Here

Examples of org.sonatype.aether.graph.DependencyFilter

        Artifact root = new DefaultArtifact("#groupId", "#artifactId", null, "pom", "#version", props, rootPom);

        ArtifactDescriptorResult artifactDescriptorResult = repo.readArtifactDescriptor(session, new ArtifactDescriptorRequest(root, repos, null));

        CollectRequest request = new CollectRequest( artifactDescriptorResult.getDependencies(), null, repos );
        DependencyFilter filter = new AndDependencyFilter();
        return repo.resolveDependencies(session, request, filter);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.