Package org.sonatype.aether.graph

Examples of org.sonatype.aether.graph.Dependency


        throws RepositoryException
    {
        if ( findPlexusUtils( node ) == null )
        {
            Artifact pu = new DefaultArtifact( GID, AID, null, EXT, VER );
            DefaultDependencyNode child = new DefaultDependencyNode( new Dependency( pu, JavaScopes.RUNTIME ) );
            child.setRepositories( node.getRepositories() );
            child.setRequestContext( node.getRequestContext() );
            node.getChildren().add( child );
        }
View Full Code Here


            }
        }

        public boolean accept( DependencyNode node, List<DependencyNode> parents )
        {
            Dependency dependency = node.getDependency();
            if ( dependency != null )
            {
                org.sonatype.aether.artifact.Artifact a = dependency.getArtifact();
                String key = ArtifactUtils.key( a.getGroupId(), a.getArtifactId(), a.getVersion() );
                return !keys.contains( key );
            }
            return false;
        }
View Full Code Here

            {
                excl.add( toExclusion( exclusion ) );
            }
        }

        return new Dependency( result, artifact.getScope(), artifact.isOptional(), excl );
    }
View Full Code Here

        for ( org.apache.maven.model.Exclusion exclusion : dependency.getExclusions() )
        {
            exclusions.add( toExclusion( exclusion ) );
        }

        Dependency result = new Dependency( artifact, dependency.getScope(), dependency.isOptional(), exclusions );

        return result;
    }
View Full Code Here

        org.sonatype.aether.artifact.Artifact artifact = new DefaultArtifact(
            resolveRequest.groupId + ":" + resolveRequest.artifactId + ":" + resolveRequest.version );

        CollectRequest collectRequest = new CollectRequest();
        collectRequest.setRoot( new Dependency( artifact, "" ) );

        // add remote repositories
        for ( RemoteRepository remoteRepository : resolveRequest.remoteRepositories )
        {
            collectRequest.addRepository(
View Full Code Here

            AetherRepositoryWriter.write(artifacts, targetDirectory);

        }

        private List<Artifact> getArtifacts(String artifact) throws MojoExecutionException {
            Dependency dependency =
                new Dependency( new DefaultArtifact( artifact ), "runtime" );

            CollectRequest collectRequest = new CollectRequest();
            collectRequest.setRoot( dependency );
            //collectRequest.addRepository( remoteRepos );
View Full Code Here

        org.sonatype.aether.artifact.Artifact artifact =
            new DefaultArtifact( groupId + ":" + artifactId + ":" + version );

        CollectRequest collectRequest = new CollectRequest();
        collectRequest.setRoot( new Dependency( artifact, "" ) );

        // add remote repositories ?
        //collectRequest.addRepository(  )

        collectRequest.setRequestContext( "project" );
View Full Code Here

        for(org.apache.maven.artifact.Artifact artifact : project.getArtifacts()) {
            if(artifact.getGroupId().equals(moduleGroupId)) {

                DefaultArtifact aetherArtifact = new DefaultArtifact(artifact.getGroupId(),artifact.getArtifactId(), artifact.getType(), artifact.getVersion());
                Dependency rootDependency = new Dependency(aetherArtifact, "runtime");

                try {
                    CollectRequest collectRequest = new CollectRequest();
                    collectRequest.setRoot(rootDependency);
                    collectRequest.setRepositories(projectRepos);
View Full Code Here

        for(org.apache.maven.artifact.Artifact artifact : project.getArtifacts()) {
            if(artifact.getGroupId().equals(moduleGroupId)) {

                DefaultArtifact aetherArtifact = new DefaultArtifact(artifact.getGroupId(),artifact.getArtifactId(), artifact.getType(), artifact.getVersion());
                Dependency rootDependency = new Dependency(aetherArtifact, "runtime");

                try {
                    CollectRequest collectRequest = new CollectRequest();
                    collectRequest.setRoot(rootDependency);
                    collectRequest.setRepositories(projectRepos);
View Full Code Here

            throw new IllegalArgumentException("no artifacts given");
        }

        CollectRequest collectRequest = new CollectRequest();
        for( Artifact a: artifacts ){
            collectRequest.addDependency( new Dependency( a, "compile" ) );
        }

        for( RemoteRepository r: repos ){
            collectRequest.addRepository( r );
        }
View Full Code Here

TOP

Related Classes of org.sonatype.aether.graph.Dependency

Copyright © 2018 www.massapicom. 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.