Package org.apache.maven.plugin

Examples of org.apache.maven.plugin.LegacySupport


            // We need to support Maven 3.0.x as well, so we use reflection to
            // access Aether APIs in a manner which is compatible with all Maven 3.x versions
            // See https://maven.apache.org/docs/3.1.0/release-notes.html
            MavenSession session = reflectiveCreateMavenSession(container, mvn, request);
            LegacySupport legacy = container.lookup(LegacySupport.class);
            legacy.setSession(session);

            // then lookup the DefaultArtifactInstaller
            DefaultArtifactInstaller dai = (DefaultArtifactInstaller) container.lookup(ArtifactInstaller.class);

            final Set<Entry<String, InputStream>> entries = origins.entrySet();
View Full Code Here


        RepositorySystemSession repoSession = initRepoSession();
        MavenSession session =
            new MavenSession( getContainer(), repoSession, new DefaultMavenExecutionRequest(),
                              new DefaultMavenExecutionResult() );

        LegacySupport legacySupport = lookup(LegacySupport.class);
        legacySupport.setSession( session );
    }
View Full Code Here

    private static RepositorySystemSession rss( PlexusContainer c )
    {
        try
        {
            LegacySupport legacySupport = c.lookup( LegacySupport.class );

            return legacySupport.getRepositorySession();
        }
        catch ( ComponentLookupException e )
        {
            throw new IllegalStateException( e );
        }
View Full Code Here

            .setLocalRepository( getLocalRepository() );           
                           
        DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
        LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
        session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
        LegacySupport legacySupport = lookup( LegacySupport.class );
        legacySupport.setSession( new MavenSession( getContainer(), session, new DefaultMavenExecutionRequest(),
                                                    new DefaultMavenExecutionResult() ) );

        ArtifactResolutionResult result = repositorySystem.resolve( request );
        resolutionErrorHandler.throwErrors( request, result );       
        assertEquals( 2, result.getArtifacts().size() );
View Full Code Here

        RepositorySystemSession repoSession = initRepoSession();
        MavenSession session =
            new MavenSession( getContainer(), repoSession, new DefaultMavenExecutionRequest(),
                              new DefaultMavenExecutionResult() );

        LegacySupport legacySupport = lookup(LegacySupport.class);
        legacySupport.setSession( session );
    }
View Full Code Here

    private static RepositorySystemSession rss( PlexusContainer c )
    {
        try
        {
            LegacySupport legacySupport = c.lookup( LegacySupport.class );

            return legacySupport.getRepositorySession();
        }
        catch ( ComponentLookupException e )
        {
            throw new IllegalStateException( e );
        }
View Full Code Here

    private static MavenExecutionRequest er( PlexusContainer c )
    {
        try
        {
            LegacySupport legacySupport = c.lookup( LegacySupport.class );

            if ( legacySupport.getSession() != null )
            {
                return legacySupport.getSession().getRequest();
            }
            else
            {
                return null;
            }
View Full Code Here

        RepositorySystemSession repoSession = initRepoSession();
        MavenSession session =
            new MavenSession( getContainer(), repoSession, new DefaultMavenExecutionRequest(),
                              new DefaultMavenExecutionResult() );

        LegacySupport legacySupport = lookup(LegacySupport.class);
        legacySupport.setSession( session );
    }
View Full Code Here

            .setRemoteRepositories( getRemoteRepositories() )
            .setLocalRepository( getLocalRepository() );           
                           
        DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
        session.setLocalRepositoryManager( new SimpleLocalRepositoryManager( request.getLocalRepository().getBasedir() ) );
        LegacySupport legacySupport = lookup( LegacySupport.class );
        legacySupport.setSession( new MavenSession( getContainer(), session, new DefaultMavenExecutionRequest(),
                                                    new DefaultMavenExecutionResult() ) );

        ArtifactResolutionResult result = repositorySystem.resolve( request );
        resolutionErrorHandler.throwErrors( request, result );       
        assertEquals( 2, result.getArtifacts().size() );
View Full Code Here

            .setLocalRepository( getLocalRepository() );           
                           
        DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
        LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
        session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
        LegacySupport legacySupport = lookup( LegacySupport.class );
        legacySupport.setSession( new MavenSession( getContainer(), session, new DefaultMavenExecutionRequest(),
                                                    new DefaultMavenExecutionResult() ) );

        ArtifactResolutionResult result = repositorySystem.resolve( request );
        resolutionErrorHandler.throwErrors( request, result );       
        assertEquals( 2, result.getArtifacts().size() );
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.LegacySupport

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.