Package org.apache.maven.profiles

Examples of org.apache.maven.profiles.DefaultProfileManager


            if ( log.isDebugEnabled() )
            {
                writeSettings( settings );
            }

            ProfileManager profileManager = new DefaultProfileManager( container, settings );

            project = projectBuilder.build( file, getLocalRepository(), profileManager, false );

            if ( log.isDebugEnabled() )
            {
View Full Code Here


    protected ProfileManager getProfileManager()
    {
        if ( profileManager == null )
        {
            profileManager = new DefaultProfileManager( getContainer(), getSettings(), System.getProperties() );
        }
        return profileManager;
    }
View Full Code Here

    // what is using this externally? jvz.
    public MavenProject buildStandaloneSuperProject( ArtifactRepository localRepository )
        throws ProjectBuildingException
    {
        //TODO mkleint - use the (Container, Properties) constructor to make system properties embeddable
        ProfileManager profileManager = new DefaultProfileManager( container );
        return buildStandaloneSuperProject( localRepository, profileManager );
    }
View Full Code Here

        List activeProfiles;

        if ( profileManager == null )
        {
            profileManager = new DefaultProfileManager( container );
        }

        profileManager.addProfiles( superModel.getProfiles() );

        String projectId = safeVersionlessKey( STANDALONE_SUPERPOM_GROUPID, STANDALONE_SUPERPOM_ARTIFACTID );
View Full Code Here

        // shall the ProfileManager intefrace expose the properties?

        ProfileManager superProjectProfileManager;
        if ( externalProfileManager instanceof DefaultProfileManager )
        {
            superProjectProfileManager = new DefaultProfileManager( container,
                                                                    ( (DefaultProfileManager) externalProfileManager ).getSystemProperties() );
        }
        else
        {
            superProjectProfileManager = new DefaultProfileManager( container );
        }

        List activeProfiles;

        superProjectProfileManager.addProfiles( superModel.getProfiles() );
View Full Code Here

        //TODO mkleint - use the (Container, Properties constructor to make system properties embeddable
        ProfileManager profileManager;
        if ( externalProfileManager != null && externalProfileManager instanceof DefaultProfileManager )
        {
            profileManager = new DefaultProfileManager( container,
                                                        ( (DefaultProfileManager) externalProfileManager ).getSystemProperties() );
        }
        else
        {
            profileManager = new DefaultProfileManager( container );
        }

        if ( externalProfileManager != null )
        {
            profileManager.explicitlyActivate( externalProfileManager.getExplicitlyActivatedIds() );
View Full Code Here

                // Ideally, we could use Warn across the board
                loggerManager.setThreshold( Logger.LEVEL_ERROR );
                // TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
            }

            ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer() );

            if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
            {
                String profilesLine = commandLine.getOptionValue( CLIManager.ACTIVATE_PROFILES );

                StringTokenizer profileTokens = new StringTokenizer( profilesLine, "," );

                while ( profileTokens.hasMoreTokens() )
                {
                    String profileAction = profileTokens.nextToken().trim();

                    if ( profileAction.startsWith( "-" ) )
                    {
                        profileManager.explicitlyDeactivate( profileAction.substring( 1 ) );
                    }
                    else if ( profileAction.startsWith( "+" ) )
                    {
                        profileManager.explicitlyActivate( profileAction.substring( 1 ) );
                    }
                    else
                    {
                        // TODO: deprecate this eventually!
                        profileManager.explicitlyActivate( profileAction );
                    }
                }
            }

            request = createRequest( commandLine, settings, eventDispatcher, loggerManager, profileManager,
View Full Code Here

            if ( debug )
            {
                loggerManager.setThreshold( Logger.LEVEL_DEBUG );
            }

            ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer() );

            if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
            {
                String profilesLine = commandLine.getOptionValue( CLIManager.ACTIVATE_PROFILES );

                StringTokenizer profileTokens = new StringTokenizer( profilesLine, "," );

                while ( profileTokens.hasMoreTokens() )
                {
                    String profileAction = profileTokens.nextToken().trim();

                    if ( profileAction.startsWith( "-" ) )
                    {
                        profileManager.explicitlyDeactivate( profileAction.substring( 1 ) );
                    }
                    else if ( profileAction.startsWith( "+" ) )
                    {
                        profileManager.explicitlyActivate( profileAction.substring( 1 ) );
                    }
                    else
                    {
                        // TODO: deprecate this eventually!
                        profileManager.explicitlyActivate( profileAction );
                    }
                }
            }

            request = createRequest( commandLine, settings, eventDispatcher, loggerManager, profileManager,
View Full Code Here

    }

    protected MavenProject getProject( File pom )
        throws Exception
    {
        return projectBuilder.build( pom, getLocalRepository(), new DefaultProfileManager( getContainer() ) );
    }
View Full Code Here

    protected ProfileManager getProfileManager()
    {
        if ( profileManager == null )
        {
            profileManager = new DefaultProfileManager( getContainer(), getSettings(), System.getProperties() );
        }
        return profileManager;
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.profiles.DefaultProfileManager

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.