Package org.sonatype.aether

Examples of org.sonatype.aether.RepositorySystemSession


            throw new IllegalArgumentException(artifact.getVersion() + " is a version range. A specific version is needed");
        } catch (InvalidVersionSpecificationException expected) {

        }

        RepositorySystemSession session = newRepositorySystemSession();
        RemoteRepository central = newCentralRepository();
        //TODO add more remote repositories - especially the JBoss one

        ArtifactRequest artifactRequest = new ArtifactRequest();
        artifactRequest.setArtifact(artifact);
View Full Code Here


    public AetherResult resolve(String groupId, String artifactId, String version, String extension) throws DependencyCollectionException, DependencyResolutionException, ArtifactResolutionException {
        return resolve(groupId, artifactId, version, extension, "");
    }

    public AetherResult resolve(String groupId, String artifactId, String version, String extension, String classifier) throws DependencyCollectionException, ArtifactResolutionException, DependencyResolutionException {
        RepositorySystemSession session = newSession();
        Dependency dependency = new Dependency(new DefaultArtifact(groupId, artifactId, classifier, extension, version), "runtime");

        CollectRequest collectRequest = new CollectRequest();
        collectRequest.setRoot(dependency);
        for (Repository repo: remoteRepos) {
View Full Code Here

        this.plexusContainer = plexusContainer;

        try {
            this.mavenExecutionRequest = this.buildMavenExecutionRequest(mavenRequest);

            RepositorySystemSession rss = ((DefaultMaven) lookup(Maven.class)).newRepositorySession(mavenExecutionRequest);
           
            mavenSession = new MavenSession( plexusContainer, rss, mavenExecutionRequest, new DefaultMavenExecutionResult() );
                       
            lookup(LegacySupport.class).setSession(mavenSession);
        } catch (MavenEmbedderException e) {
View Full Code Here

            ProjectBuilder projectBuilder = lookup( ProjectBuilder.class );
            ProjectBuildingRequest projectBuildingRequest = this.mavenExecutionRequest.getProjectBuildingRequest();

            projectBuildingRequest.setValidationLevel( this.mavenRequest.getValidationLevel() );

            RepositorySystemSession repositorySystemSession = buildRepositorySystemSession();

            projectBuildingRequest.setRepositorySession( repositorySystemSession );

            projectBuildingRequest.setProcessPlugins( this.mavenRequest.isProcessPlugins() );
View Full Code Here

        }
        if (classifier == null) {
            classifier = DEFAULT_CLASSIFIER;
        }

        RepositorySystemSession session = newSession();
        Dependency dependency = new Dependency(new DefaultArtifact(groupId, artifactId, classifier, extension, version), "runtime");

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

TOP

Related Classes of org.sonatype.aether.RepositorySystemSession

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.