Package net.flexmojos.oss.configurator

Examples of net.flexmojos.oss.configurator.Configurator


        if ( !( packaging.equals( SWC ) || packaging.equals( SWF ) ) )
        {
            return;
        }

        Configurator cfg = configurators.get( configurator );
        if ( cfg == null )
        {
            // not a plexus component, trying brute force
            Class<Configurator> cfgClass;
            try
            {
                cfgClass = (Class<Configurator>) Class.forName( configurator );
            }
            catch ( ClassNotFoundException e )
            {
                throw new MojoExecutionException( "Configurator not found: " + configurator, e );
            }

            try
            {
                cfg = cfgClass.newInstance();
            }
            catch ( Exception e )
            {
                throw new MojoExecutionException( "Erro creating a new configurator instance: " + configurator, e );
            }
        }

        if ( parameters == null )
        {
            parameters = new LinkedHashMap<String, Object>();
        }
        parameters.put( "project", project );
        parameters.put( "classifier", classifier );

        try
        {
            if ( SWC.equals( getProjectType() ) )
            {
                cfg.buildConfiguration( (ICompcConfiguration) this, parameters );
            }
            else
            {
                cfg.buildConfiguration( (ICommandLineConfiguration) this, getSourceFile(), parameters );
            }
        }
        catch ( ConfiguratorException e )
        {
            throw new MojoExecutionException( "Failed to execute configurator: " + e.getMessage(), e );
View Full Code Here

TOP

Related Classes of net.flexmojos.oss.configurator.Configurator

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.