Package org.apache.maven.model

Examples of org.apache.maven.model.Activation


    public void testShouldOverrideAndActivateInactiveProfile() throws ProfileActivationException
    {
        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 );
       
        ProfileManager profileManager = new DefaultProfileManager(getContainer());
       
View Full Code Here


    public void testShouldOverrideAndDeactivateActiveProfile() throws ProfileActivationException
    {
        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 );
       
        ProfileManager profileManager = new DefaultProfileManager(getContainer());
       
View Full Code Here

   public void testOsActivationProfile() throws ProfileActivationException
    {
        Profile osActivated = new Profile();
        osActivated.setId("os-profile");

        Activation osActivation = new Activation();

        ActivationOS activationOS = new ActivationOS();

        activationOS.setName("!dddd");

        osActivation.setOs(activationOS);

        osActivated.setActivation(osActivation);

        ProfileManager profileManager = new DefaultProfileManager(getContainer());
View Full Code Here

                ") with new instance from source: " + profile.getSource() );
        }

        profilesById.put( profile.getId(), profile );

        Activation activation = profile.getActivation();

        if ( activation != null && activation.isActiveByDefault() )
        {
            activateAsDefault( profileId );
        }
    }
View Full Code Here

        return profile.getActivation() != null && profile.getActivation().getFile() != null;
    }

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

        ActivationFile actFile = activation.getFile();

        if ( actFile != null )
        {
            // check if the file exists, if it does then the profile will be active
            String fileString = actFile.getExists();
View Full Code Here

        return profile.getActivation() != null && profile.getActivation().getFile() != null;
    }

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

        ActivationFile actFile = activation.getFile();

        if ( actFile != null )
        {
            // check if the file exists, if it does then the profile will be active
            String fileString = actFile.getExists();
View Full Code Here

    }

    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;
View Full Code Here

        throws Exception
    {
        Profile notActivated = new Profile();
        notActivated.setId( "notActivated" );

        Activation nonActivation = new Activation();

        nonActivation.setJdk( "19.2" );

        notActivated.setActivation( nonActivation );

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

        Activation defaultActivation = new Activation();

        defaultActivation.setActiveByDefault( true );

        defaultActivated.setActivation( defaultActivation );

        Properties props = System.getProperties();
View Full Code Here

        throws Exception
    {
        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 );

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

        Activation defaultActivation = new Activation();

        defaultActivation.setActiveByDefault( true );

        defaultActivated.setActivation( defaultActivation );

        Properties props = System.getProperties();
View Full Code Here

        throws Exception
    {
        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 );

        Properties props = System.getProperties();
View Full Code Here

TOP

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

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.