Package org.apache.maven

Examples of org.apache.maven.SessionScope$ScopeState


     * @since 3.2.0
     */
    public void executeMojo( MavenSession session, MavenProject project, MojoExecution execution )
        throws Exception
    {
        SessionScope sessionScope = lookup( SessionScope.class );
        try
        {
            sessionScope.enter();
            sessionScope.seed( MavenSession.class, session );

            MojoExecutionScope executionScope = lookup( MojoExecutionScope.class );
            try
            {
                executionScope.enter();

                executionScope.seed( MavenProject.class, project );
                executionScope.seed( MojoExecution.class, execution );

                Mojo mojo = lookupConfiguredMojo( session, execution );
                mojo.execute();

                MojoExecutionEvent event = new MojoExecutionEvent( session, project, execution, mojo );
                for ( MojoExecutionListener listener : getContainer().lookupList( MojoExecutionListener.class ) )
                {
                    listener.afterMojoExecutionSuccess( event );
                }
            }
            finally
            {
                executionScope.exit();
            }
        }
        finally
        {
            sessionScope.exit();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.SessionScope$ScopeState

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.