Examples of MxmlcConfigurationHolder


Examples of net.flexmojos.oss.compiler.MxmlcConfigurationHolder

        }

        TestCompilerMojo cfg = this.clone();
        cfg.finalName = testFilename;

        return executeCompiler( new MxmlcConfigurationHolder( cfg, testMxml ), fullSynchronization );
    }
View Full Code Here

Examples of net.flexmojos.oss.compiler.MxmlcConfigurationHolder

        {
            getLog().warn( "Skipping compiler, source path doesn't exist. " + Arrays.toString( getSourcePath() ) );
            return;
        }

        executeCompiler( new MxmlcConfigurationHolder( this, getSourceFile() ), true );
        if ( !file( getOutput() ).exists() )
        {
            throw new IllegalStateException( "Output file doesn't exist and now error was throw by the compiler!" );
        }

        if ( getLocalesRuntime() != null )
        {
            List<Result> results = new ArrayList<Result>();
            for ( String locale : getLocalesRuntime() )
            {
                MxmlcMojo cfg = this.clone();
                configureResourceBundle( locale, cfg );
                results.add( executeCompiler( new MxmlcConfigurationHolder( cfg, null ), fullSynchronization ) );
            }

            wait( results );
        }

        if ( getModules() != null )
        {
            List<Result> results = new ArrayList<Result>();

            for ( Module module : getModules() )
            {
                if ( module.isOptimize() == null )
                {
                    module.setOptimize( modulesLoadExterns );
                }

                File moduleSource =
                    SourceFileResolver.resolveSourceFile( project.getCompileSourceRoots(), module.getSourceFile() );

                String classifier = FilenameUtils.getBaseName( moduleSource.getName() ).toLowerCase();

                String moduleFinalName;
                if ( module.getFinalName() != null )
                {
                    moduleFinalName = module.getFinalName();
                }
                else
                {
                    moduleFinalName = project.getBuild().getFinalName() + "-" + classifier;
                }

                File moduleOutputDir;
                if ( module.getDestinationPath() != null )
                {
                    moduleOutputDir = new File( project.getBuild().getDirectory(), module.getDestinationPath() );
                }
                else
                {
                    moduleOutputDir = new File( project.getBuild().getDirectory() );
                }

                List<String> loadExterns = new ArrayList<String>();
                loadExterns.add( getLinkReport() );
                if ( getLoadExterns() != null )
                {
                    loadExterns.addAll( Arrays.asList( getLoadExterns() ) );
                }

                MxmlcMojo cfg = this.clone();
                cfg.classifier = classifier;
                cfg.targetDirectory = moduleOutputDir;
                cfg.finalName = moduleFinalName;
                if ( module.isOptimize() )
                {
                    cfg.getCache().put( LOAD_EXTERNS, loadExterns.toArray( new String[1] ) );
                }
                cfg.getCache().put( RUNTIME_SHARED_LIBRARY_PATH, null );
                cfg.getCache().put( INCLUDE_LIBRARIES, null );
                cfg.getCache().put( EXTERNAL_LIBRARY_PATH, getModulesExternalLibraryPath() );
                results.add( executeCompiler( new MxmlcConfigurationHolder( cfg, moduleSource ), fullSynchronization ) );
            }

            wait( results );
        }
    }
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.