Package org.apache.maven.execution

Examples of org.apache.maven.execution.DefaultMavenExecutionRequest


        ArtifactRepository localRepository = createLocalRepository( embedder, settings, commandLine );

        File userDir = new File( System.getProperty( "user.dir" ) );

        request = new DefaultMavenExecutionRequest( localRepository, settings, eventDispatcher,
                                                    commandLine.getArgList(), userDir.getPath(), profileManager,
                                                    executionProperties, userProperties, showErrors );

        // TODO [BP]: do we set one per mojo? where to do it?
        Logger logger = loggerManager.getLoggerForComponent( Mojo.ROLE );
View Full Code Here


       
        CliRequest( String[] args, ClassWorld classWorld )
        {
            this.args = args;
            this.classWorld = classWorld;
            this.request = new DefaultMavenExecutionRequest();
        }
View Full Code Here

     */
    public MavenProject getProject( File pom, ArtifactRepository localRepository, Settings settings,
                                    Properties userProperties, ProfileManager globalProfileManager )
        throws ProjectBuildingException, ArtifactResolutionException, ProfileActivationException
    {
        MavenExecutionRequest request = new DefaultMavenExecutionRequest(
                                                                      localRepository,
                                                                      settings,
                                                                      new DefaultEventDispatcher(),
                                                                      Collections.EMPTY_LIST,
                                                                      pom.getParentFile()
View Full Code Here

    }

    public static MavenSession getMavenSession()
    {
        final DefaultMavenExecutionResult defaultMavenExecutionResult = new DefaultMavenExecutionResult();
        MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest();
        mavenExecutionRequest.setExecutionListener( new AbstractExecutionListener() );
        mavenExecutionRequest.setGoals( Arrays.asList( "clean", "aggr", "install" ) );
        final MavenSession session = new MavenSession( null, mavenExecutionRequest, defaultMavenExecutionResult );
        final ProjectDependencyGraphStub dependencyGraphStub = new ProjectDependencyGraphStub();
        session.setProjectDependencyGraph( dependencyGraphStub );
        session.setProjects( dependencyGraphStub.getSortedProjects() );
        return session;
View Full Code Here

       
        CliRequest( String[] args, ClassWorld classWorld )
        {
            this.args = args;
            this.classWorld = classWorld;
            this.request = new DefaultMavenExecutionRequest();
        }
View Full Code Here

    }

    protected MavenExecutionRequest createMavenExecutionRequest( File pom )
        throws Exception
    {       
        MavenExecutionRequest request = new DefaultMavenExecutionRequest()
            .setPom( pom )
            .setProjectPresent( true )
            .setShowErrors( true )
            .setPluginGroups( Arrays.asList( new String[] { "org.apache.maven.plugins" } ) )
            .setLocalRepository( getLocalRepository() )
View Full Code Here

    }

    private static MavenSession createSession( PlexusContainer container, ArtifactRepository repo, Properties properties )
        throws CycleDetectedException, DuplicateProjectException
    {
        MavenExecutionRequest request = new DefaultMavenExecutionRequest()
            .setSystemProperties( properties )
            .setGoals( Collections.EMPTY_LIST )
            .setBaseDirectory( new File( "" ) )
            .setLocalRepository( repo );
View Full Code Here

       
        CliRequest( String[] args, ClassWorld classWorld )
        {
            this.args = args;
            this.classWorld = classWorld;
            this.request = new DefaultMavenExecutionRequest();
        }
View Full Code Here

        }

        Settings settings;
        try
        {
            DefaultMavenExecutionRequest request = new DefaultMavenExecutionRequest();
            request.setUserSettingsFile( new File( System.getProperty( "user.home" ), ".m2/settings.xml" ) );
            request.setGlobalSettingsFile( new File( System.getProperty( "maven.home" ), "conf/settings.xml" ) );
            settings = settingsBuilder.buildSettings( request );
        }
        catch ( IOException e )
        {
            throw new TestToolsException( "Error building Maven settings.", e );
View Full Code Here

        }

        Settings settings;
        try
        {
            DefaultMavenExecutionRequest request = new DefaultMavenExecutionRequest();
            request.setUserSettingsFile( new File( System.getProperty( "user.home" ), ".m2/settings.xml" ) );
            request.setGlobalSettingsFile( new File( System.getProperty( "maven.home" ), "conf/settings.xml" ) );
            settings = settingsBuilder.buildSettings( request );
        }
        catch ( IOException e )
        {
            throw new TestToolsException( "Error building Maven settings.", e );
View Full Code Here

TOP

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

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.