Examples of ActivationProperty


Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId("syspropActivated");
       
        Activation syspropActivation = new Activation();
       
        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName("!java.version");
       
        syspropActivation.setProperty(syspropProperty);
       
        syspropActivated.setActivation( syspropActivation );
       
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId("syspropActivated");
       
        Activation syspropActivation = new Activation();
       
        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName("!java.version");
       
        syspropActivation.setProperty(syspropProperty);
       
        syspropActivated.setActivation( syspropActivation );
       
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId("syspropActivated");
       
        Activation syspropActivation = new Activation();
       
        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName("java.version");
       
        syspropActivation.setProperty(syspropProperty);
       
        syspropActivated.setActivation( syspropActivation );
       
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

    public boolean isActive( Profile profile )
        throws ProfileActivationException
    {
        Activation activation = profile.getActivation();

        ActivationProperty property = activation.getProperty();

        if ( property != null )
        {
            String name = property.getName();
            boolean reverseName = false;
           
            if ( name == null )
            {
                throw new ProfileActivationException( "The property name is required to activate the profile '"
                    + profile.getId() + "'" );
            }
           
            if ( name.startsWith("!") )
            {
                reverseName = true;
                name = name.substring( 1 );
            }
           
            String sysValue = properties.getProperty( name );

            String propValue = property.getValue();
            if ( StringUtils.isNotEmpty( propValue ) )
            {
                boolean reverseValue = false;
                if ( propValue.startsWith( "!" ) )
                {
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId( "syspropActivated" );

        Activation syspropActivation = new Activation();

        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName( "java.version" );

        syspropActivation.setProperty( syspropProperty );

        syspropActivated.setActivation( syspropActivation );
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId( "syspropActivated" );

        Activation syspropActivation = new Activation();

        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName( "!java.version" );

        syspropActivation.setProperty( syspropProperty );

        syspropActivated.setActivation( syspropActivation );
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId( "syspropActivated" );

        Activation syspropActivation = new Activation();

        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName( "!java.version" );

        syspropActivation.setProperty( syspropProperty );

        syspropActivated.setActivation( syspropActivation );
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Profile syspropActivated = new Profile();
        syspropActivated.setId( "syspropActivated" );

        Activation syspropActivation = new Activation();

        ActivationProperty syspropProperty = new ActivationProperty();
        syspropProperty.setName( "java.version" );

        syspropActivation.setProperty( syspropProperty );

        syspropActivated.setActivation( syspropActivation );
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        Activation activation = profile.getActivation();

        if ( activation != null )
        {
            ActivationProperty property = activation.getProperty();

            if ( property != null )
            {
                String name = property.getName();
                boolean reverseName = false;

                if ( name != null && name.startsWith( "!" ) )
                {
                    reverseName = true;
                    name = name.substring( 1 );
                }

                if ( name == null || name.length() <= 0 )
                {
                    problems.add( Severity.ERROR, "The property name is required to activate the profile "
                        + profile.getId(), null );
                    return false;
                }

                String sysValue = context.getUserProperties().getProperty( name );
                if ( sysValue == null )
                {
                    sysValue = context.getSystemProperties().getProperty( name );
                }

                String propValue = property.getValue();
                if ( StringUtils.isNotEmpty( propValue ) )
                {
                    boolean reverseValue = false;
                    if ( propValue.startsWith( "!" ) )
                    {
View Full Code Here

Examples of org.apache.maven.model.ActivationProperty

        if ( activation == null )
        {
            return false;
        }

        ActivationProperty property = activation.getProperty();

        if ( property == null )
        {
            return false;
        }

        String name = property.getName();
        boolean reverseName = false;

        if ( name != null && name.startsWith( "!" ) )
        {
            reverseName = true;
            name = name.substring( 1 );
        }

        if ( name == null || name.length() <= 0 )
        {
            problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
                    .setMessage( "The property name is required to activate the profile " + profile.getId() )
                    .setLocation( property.getLocation( "" ) ) );
            return false;
        }

        String sysValue = context.getUserProperties().get( name );
        if ( sysValue == null )
        {
            sysValue = context.getSystemProperties().get( name );
        }

        String propValue = property.getValue();
        if ( StringUtils.isNotEmpty( propValue ) )
        {
            boolean reverseValue = false;
            if ( propValue.startsWith( "!" ) )
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.