Package org.apache.maven.model

Examples of org.apache.maven.model.Prerequisites


                }
            }

            Map<String, Object> properties = new LinkedHashMap<String, Object>();

            Prerequisites prerequisites = model.getPrerequisites();
            if ( prerequisites != null )
            {
                properties.put( "prerequisites.maven", prerequisites.getMaven() );
            }

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
            for ( int i = 0; i < licenses.size(); i++ )
View Full Code Here


    }

    protected void mergeModel_Prerequisites( Model target, Model source, boolean sourceDominant,
                                             Map<Object, Object> context )
    {
        Prerequisites src = source.getPrerequisites();
        if ( src != null )
        {
            Prerequisites tgt = target.getPrerequisites();
            if ( tgt == null )
            {
                tgt = new Prerequisites();
                target.setPrerequisites( tgt );
            }
            mergePrerequisites( tgt, src, sourceDominant, context );
        }
    }
View Full Code Here

                }
            }

            Map<String, Object> properties = new LinkedHashMap<String, Object>();

            Prerequisites prerequisites = model.getPrerequisites();
            if ( prerequisites != null )
            {
                properties.put( "prerequisites.maven", prerequisites.getMaven() );
            }

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
            for ( int i = 0; i < licenses.size(); i++ )
View Full Code Here

    }

    protected void mergeModel_Prerequisites( Model target, Model source, boolean sourceDominant,
                                             Map<Object, Object> context )
    {
        Prerequisites src = source.getPrerequisites();
        if ( src != null )
        {
            Prerequisites tgt = target.getPrerequisites();
            if ( tgt == null )
            {
                tgt = new Prerequisites();
                tgt.setMaven( null );
                target.setPrerequisites( tgt );
            }
            mergePrerequisites( tgt, src, sourceDominant, context );
        }
    }
View Full Code Here

        if ( src == null )
        {
            return null;
        }
       
        Prerequisites result = new Prerequisites();
       
        result.setMaven( src.getMaven() );

        return result;
    }
View Full Code Here

    }

    protected void mergeModel_Prerequisites( Model target, Model source, boolean sourceDominant,
                                             Map<Object, Object> context )
    {
        Prerequisites src = source.getPrerequisites();
        if ( src != null )
        {
            Prerequisites tgt = target.getPrerequisites();
            if ( tgt == null )
            {
                tgt = new Prerequisites();
                tgt.setMaven( null );
                target.setPrerequisites( tgt );
            }
            mergePrerequisites( tgt, src, sourceDominant, context );
        }
    }
View Full Code Here

        throws Exception
    {
        RequirePrerequisite rule = new RequirePrerequisite();

        MavenProject project = mock( MavenProject.class );
        when( project.getPrerequisites() ).thenReturn( new Prerequisites() );

        EnforcerRuleHelper helper = mock( EnforcerRuleHelper.class );
        when( helper.evaluate( "${project}" ) ).thenReturn( project );

        rule.execute( helper );
View Full Code Here

    {
        RequirePrerequisite rule = new RequirePrerequisite();
        rule.setMavenVersion( "3.0" );

        MavenProject project = mock( MavenProject.class );
        when( project.getPrerequisites() ).thenReturn( new Prerequisites() );

        EnforcerRuleHelper helper = mock( EnforcerRuleHelper.class );
        when( helper.evaluate( "${project}" ) ).thenReturn( project );

        rule.execute( helper );
View Full Code Here

    {
        RequirePrerequisite rule = new RequirePrerequisite();
        rule.setMavenVersion( "[3.0,)" );

        MavenProject project = mock( MavenProject.class );
        when( project.getPrerequisites() ).thenReturn( new Prerequisites() );

        EnforcerRuleHelper helper = mock( EnforcerRuleHelper.class );
        when( helper.evaluate( "${project}" ) ).thenReturn( project );

        rule.execute( helper );
View Full Code Here

    {
        RequirePrerequisite rule = new RequirePrerequisite();
        rule.setMavenVersion( "2.2.1" );

        MavenProject project = mock( MavenProject.class );
        Prerequisites prerequisites = new Prerequisites();
        prerequisites.setMaven( "3.0" );
        when( project.getPrerequisites() ).thenReturn( prerequisites );

        EnforcerRuleHelper helper = mock( EnforcerRuleHelper.class );
        when( helper.evaluate( "${project}" ) ).thenReturn( project );
View Full Code Here

TOP

Related Classes of org.apache.maven.model.Prerequisites

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.