Package org.apache.maven.project

Examples of org.apache.maven.project.Project


            displayGoals( true, plugin );

            if ( plugin != null )
            {
                Project project = mavenSession.getPluginProjectFromGoal( plugin );
                if ( project != null && project.getDescription() != null )
                {
                    log.info( wrapConsoleMessage( project.getDescription(), 0, CONSOLE_WIDTH ) );
                }
            }

            exit( RC_OK );
        }
View Full Code Here


            String title = MavenUtils.getMessage( "displayProjectHelp.title" );
            log.info( title );
            log.info( format( "", title.length(), '=' ) );
            log.info( "" );

            Project rootProject = mavenSession.getRootProject();
            if ( rootProject.getBuild() != null && rootProject.getBuild().getDefaultGoal() != null )
            {
                String defaultGoal = rootProject.getBuild().getDefaultGoal();
                String msg = MavenUtils.getMessage( "displayGoals.defaultGoal" ) + defaultGoal;
                log.info( wrapConsoleMessage( msg, WRAP_INDENT + 1, CONSOLE_WIDTH ) );
            }

            displayGoals( false, null, goals );
View Full Code Here

        throws JellyTagException
    {
        checkAttribute( value, "value" );
        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                context.setVariable( property, value );
            }
            else
View Full Code Here

    public static Project getProject( List projects, String id )
    {
        Iterator iter = projects.iterator();
        while ( iter.hasNext() )
        {
            Project project = (Project) iter.next();
            if ( project.getId().equals( id ) )
            {
                return project;
            }
        }
        return null;
View Full Code Here

        log.info( "Our processing order:" );

        for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
        {
            Project p = (Project) i.next();
            log.info( p.getName() );
        }

        ArrayList reactorProjects = new ArrayList();

        Runtime r = Runtime.getRuntime();
        for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
        {
            // The basedir needs to be set for the project
            // We just need the descriptor.

            Project project = (Project) i.next();
            beforeProject( project );

            final long mb = 1024 * 1024;
            log.info( "+----------------------------------------" );
            log.info( "| " + getBanner() + " " + project.getName() );
            log.info( "| Memory: " + ( ( r.totalMemory() - r.freeMemory() ) / mb ) + "M/" + ( r.totalMemory() / mb )
                + "M" );
            log.info( "+----------------------------------------" );

            // We only try to attain goals if they have been set. The reactor
View Full Code Here

            //Initialise all the true goals of the system
            Iterator iter = projects.iterator();
            while ( iter.hasNext() )
            {
                Project project = (Project) iter.next();
                Goal projectGoal = getOrCreateGoal( project, true );
                doItAll.addPrecursor( projectGoal );
            }

            //Now add the dependencies
            iter = projects.iterator();
            while ( iter.hasNext() )
            {
                Project project = (Project) iter.next();
                Goal projectGoal = getExistingGoal( project );

                Iterator depIter = project.getDependencies().iterator();
                while ( depIter.hasNext() )
                {
                    Dependency dep = (Dependency) depIter.next();
                    Project depProject = new Project();
                    depProject.setId( dep.getId() );

                    Goal depGoal = getOrCreateGoal( depProject, false );
                    projectGoal.addPrecursor( depGoal );
                }
            }
View Full Code Here

        throws JellyTagException
    {
        checkAttribute( var, "var" );
        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                Object value = context.getVariable( property );
                getContext().setVariable( var, value );
            }
View Full Code Here

        throws JellyTagException
    {
        checkAttribute( var, "var" );
        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                Object value = context.getVariable( property );
                getContext().setVariable( var, value );
            }
View Full Code Here

        return results;
    }

    private static Project createProject( String id )
    {
        Project p = new Project();
        p.setId( id );
        return p;
    }
View Full Code Here

    }

    private static Project createProject( String id, String dependencies )
    {
        StringTokenizer depToks = new StringTokenizer( dependencies, ",", false );
        Project p = createProject( id );
        while ( depToks.hasMoreTokens() )
        {
            String token = depToks.nextToken();
            Dependency d = createDependency( token );
            p.addDependency( d );
        }
        return p;
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.project.Project

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.