Package org.apache.maven.execution

Examples of org.apache.maven.execution.MavenSession


         * NOTE: This provides backward-compat with maven-deploy-plugin:2.4 which bypasses the repository factory when
         * using an alternative deployment location.
         */
        if ( repository instanceof DefaultArtifactRepository && repository.getAuthentication() == null )
        {
            MavenSession session = legacySupport.getSession();

            if ( session != null )
            {
                MavenExecutionRequest request = session.getRequest();

                if ( request != null )
                {
                    List<ArtifactRepository> repositories = Arrays.asList( repository );

View Full Code Here


        configuration.setLocalRepository( localRepository );
        configuration.setRemoteRepositories( remoteRepositories );
        configuration.setProcessPlugins( false );
        configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );

        MavenSession session = legacySupport.getSession();
        if ( session != null )
        {
            MavenExecutionRequest request = session.getRequest();
            if ( request != null )
            {
                configuration.setServers( request.getServers() );
                configuration.setMirrors( request.getMirrors() );
                configuration.setProxies( request.getProxies() );
                configuration.setTransferListener( request.getTransferListener() );
                configuration.setForceUpdate( request.isUpdateSnapshots() );
            }
            configuration.setOffline( session.isOffline() );
            configuration.setSystemProperties( session.getSystemProperties() );
            configuration.setUserProperties( session.getUserProperties() );
        }
        else
        {
            configuration.setSystemProperties( System.getProperties() );
        }
View Full Code Here

       
        Settings settings = new Settings();
        settings.setLocalRepository( System.getProperty( "localRepository", System.getProperty( "maven.repo.local",
                                                                                                "/path/to/local/repo" ) ) );
       
        MavenSession session = new StubMavenSession( settings );
       
        mavenResourcesFiltering.filterResources( resources, outputDirectory, mavenProject, "UTF-8", filtersFile,
                                                 Collections.EMPTY_LIST, session );
       
        Properties result = new Properties();
View Full Code Here

            request.setLocalRepository(maven.getLocalRepository());

            // 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);
View Full Code Here

                MavenProject project = (MavenProject) i.next();
                getLogger().info( "  " + project.getName() );
            }
        }

        MavenSession session = createSession( request, rm );

        session.setUsingPOMsFromFilesystem( foundProjects );

        lifecycleExecutor.execute( session, rm, dispatcher );

        return rm;
    }
View Full Code Here

    // or not.

    protected MavenSession createSession( MavenExecutionRequest request,
                                          ReactorManager rpm )
    {
        return new MavenSession( container, request.getSettings(), request.getLocalRepository(),
                                 request.getEventDispatcher(), rpm, request.getGoals(), request.getBaseDirectory(),
                                 request.getExecutionProperties(), request.getStartTime() );
    }
View Full Code Here

    public void testGetManifestExtensionList()
        throws Exception
    {
        MavenArchiver archiver = new MavenArchiver();

        MavenSession session = getDummySession();

        Model model = new Model();
        model.setArtifactId( "dummy" );

        MavenProject project = new MavenProject( model );
View Full Code Here

        try
        {
            MavenArchiver archiver = new MavenArchiver();

            MavenSession session = getDummySession();

            Model model = new Model();
            model.setArtifactId( "dummy" );

            MavenProject project = new MavenProject( model )
View Full Code Here

        File jarFile = new File( "target/test/dummy.jar" );
        JarArchiver jarArchiver = getCleanJarArciver( jarFile );

        MavenArchiver archiver = getMavenArchiver( jarArchiver );

        MavenSession session = getDummySession();
        MavenProject project = getDummyProject();

        MavenArchiveConfiguration config = new MavenArchiveConfiguration();
        config.setForced( false );
View Full Code Here

            File jarFile = new File( "target/test/dummy.jar" );
            JarArchiver jarArchiver = getCleanJarArciver( jarFile );

            MavenArchiver archiver = getMavenArchiver( jarArchiver );

            MavenSession session = getDummySession();
            MavenProject project = getDummyProject();

            MavenArchiveConfiguration config = new MavenArchiveConfiguration();
            config.setForced( true );
            config.getManifest().setAddDefaultImplementationEntries( false );
View Full Code Here

TOP

Related Classes of org.apache.maven.execution.MavenSession

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.