Package org.apache.maven.project

Examples of org.apache.maven.project.Project


        projects = dr.getSortedDependencies( true );
        assertBefore( projects, "b:b", "e:e" );
        assertBefore( projects, "e:e", "n:n" );
        assertBefore( projects, "n:n", "j:j" );

        Project e = DependencyResolver.getProject( projects, "e:e" );
        assertEquals( "test1.sorted", "b:b,e:e", listify( dri.getSortedDependencies( e, true ) ) );
        Project n = DependencyResolver.getProject( projects, "n:n" );
        assertEquals( "test1.sorted", "b:b,e:e,n:n", listify( dri.getSortedDependencies( n, true ) ) );
        Project j = DependencyResolver.getProject( projects, "j:j" );
        assertEquals( "test1.sorted", "b:b,e:e,n:n,j:j", listify( dri.getSortedDependencies( j, true ) ) );
    }
View Full Code Here


        dri.setProjects( projects );
        projects = dri.getSortedDependencies( true );

        assertEquals( "test3.sorted", "th:th,eq:eq,ui:ui,ck:ck,br:br,ow:ow,nf:nf,ox:ox", listify( dri
            .getSortedDependencies( true ) ) );
        Project eq = DependencyResolver.getProject( projects, "eq:eq" );
        assertEquals( "test3.sorted", "th:th,eq:eq", listify( dri.getSortedDependencies( eq, true ) ) );
        Project ck = DependencyResolver.getProject( projects, "ck:ck" );
        assertEquals( "test3.sorted", "th:th,eq:eq,ui:ui,ck:ck", listify( dri.getSortedDependencies( ck, true ) ) );
        Project ow = DependencyResolver.getProject( projects, "ow:ow" );
        assertEquals( "test3.sorted", "th:th,eq:eq,ui:ui,ck:ck,br:br,ow:ow",
                      listify( dri.getSortedDependencies( ow, true ) ) );
    }
View Full Code Here

        dri.setProjects( projects );
        projects = dri.getSortedDependencies( true );

        assertEquals( "test2.sorted", "th:th,eq:eq,ui:ui,ck:ck,br:br,ow:ow,nf:nf,ox:ox", listify( dri
            .getSortedDependencies( true ) ) );
        Project eq = DependencyResolver.getProject( projects, "eq:eq" );
        assertEquals( "test3.sorted", "th:th,eq:eq", listify( dri.getSortedDependencies( eq, true ) ) );
        Project ck = DependencyResolver.getProject( projects, "ck:ck" );
        assertEquals( "test3.sorted", "th:th,eq:eq,ui:ui,ck:ck", listify( dri.getSortedDependencies( ck, true ) ) );
        Project ow = DependencyResolver.getProject( projects, "ow:ow" );
        assertEquals( "test3.sorted", "th:th,eq:eq,ui:ui,ck:ck,br:br,ow:ow",
                      listify( dri.getSortedDependencies( ow, true ) ) );
    }
View Full Code Here

    public void dumpList( List projects )
    {
        Iterator iter = projects.iterator();
        while ( iter.hasNext() )
        {
            Project project = (Project) iter.next();
            System.out.println( project.getId() );
        }
    }
View Full Code Here

    public int getIndex( List projects, String id )
    {
        for ( int i = 0; i < projects.size(); i++ )
        {
            Project p = (Project) projects.get( i );
            if ( p.getId().equals( id ) )
            {
                return i;
            }
        }
        throw new IllegalArgumentException( "No such project: " + id );
View Full Code Here

    {
        StringBuffer buf = new StringBuffer();
        Iterator iter = projects.iterator();
        while ( iter.hasNext() )
        {
            Project project = (Project) iter.next();
            buf.append( project.getId() );
            if ( iter.hasNext() )
            {
                buf.append( "," );
            }
        }
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

        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

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.