Package org.apache.maven.continuum.project.builder

Examples of org.apache.maven.continuum.project.builder.ContinuumProjectBuilder


        String curl = getString( context, KEY_URL );

        URL url;

        ContinuumProjectBuilder projectBuilder = projectBuilderManager.getProjectBuilder( projectBuilderId );

        ContinuumProjectBuildingResult result;

        try
        {
            if ( !curl.startsWith( "http" ) )
            {
                url = new URL( curl );

                result = projectBuilder.buildProjectsFromMetadata( url, null, null );
            }
            else
            {
                url = new URL( curl );
                String username = null;
                String password = null;

                try
                {
                    Settings settings = getSettings();

                    getLogger().info( "checking for settings auth setup" );
                    if ( settings != null && settings.getServer( url.getHost() ) != null )
                    {
                        getLogger().info( "found setting based auth setup, using" );
                        Server server = settings.getServer( url.getHost() );

                        username = server.getUsername();
                        password = server.getPassword();
                    }
                }
                catch ( SettingsConfigurationException se )
                {
                    getLogger().warn( "problem with settings file, disabling scm resolution of username and password" );
                }

                MungedHttpsURL mungedURL;

                if ( username == null )
                {
                    mungedURL = new MungedHttpsURL( curl );
                    username = mungedURL.getUsername();
                    password = mungedURL.getPassword();
                }
                else
                {
                    mungedURL = new MungedHttpsURL( curl, username, password );
                }

                mungedURL.setLogger( getLogger() );

                if ( mungedURL.isValid() )
                {
                    url = mungedURL.getURL();

                    BuildDefinitionTemplate buildDefinitionTemplate = getBuildDefinitionTemplate( context );
                    if ( buildDefinitionTemplate == null )
                    {
                        buildDefinitionTemplate = projectBuilder.getDefaultBuildDefinitionTemplate();
                    }
                    result = projectBuilder.buildProjectsFromMetadata( url, username, password, loadRecursiveProjects,
                                                                       buildDefinitionTemplate );

                }
                else
                {
View Full Code Here


    // ----------------------------------------------------------------------

    public ContinuumProjectBuilder getProjectBuilder( String id )
        throws ContinuumProjectBuilderManagerException
    {
        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) projectBuilders.get( id );

        if ( projectBuilder == null )
        {
            throw new ContinuumProjectBuilderManagerException( "No such project creator with id '" + id + "'." );
        }
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.project.builder.ContinuumProjectBuilder

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.