DefaultFlexCompiler extends AbstractLogEnabled implements FlexCompiler { public Result compileSwf( MxmlcConfigurationHolder cfgHolder, boolean sychronize, final String compilerName ) throws Exception { final List<String> argsList = parser.getArgumentsList( cfgHolder.configuration, ICommandLineConfiguration.class ); if ( cfgHolder.sourceFile != null ) { argsList.add( cfgHolder.sourceFile.getAbsolutePath() ); } return CommandUtil.execute( new Command() { public void command() throws Exception { String[] args = argsList.toArray( new String[argsList.size()] ); logArgs( args ); try { executeMxmlcMain(compilerName, args); } catch (Throwable t) { throw new Exception("Exception during Mxmlc execution", t); } } }, sychronize ); }  Result compileSwc( final ICompcConfiguration configuration, boolean sychronize,
                              final String compilerName ); Result compileSwf( MxmlcConfigurationHolder cfgHolder, boolean sychronize,
                              final String compilerName ); Result asdoc( final IASDocConfiguration configuration, boolean sychronize,
                         final String compilerName ); Result digest( final IDigestConfiguration configuration, boolean sychronize,
                          final String compilerName ); Result optimize( final IOptimizerConfiguration configuration, boolean sychronize,
                            final String compilerName );  }
@Test public void compileDummySwf() throws Exception { File output = new File( as3, "result.swf" ); DefaultFlexCompiler compiler = (DefaultFlexCompiler) plexus.lookup( FlexCompiler.class ); MapLogger logger = new MapLogger(); compiler.enableLogging( logger ); ICommandLineConfiguration cfg = mock( ICommandLineConfiguration.class, RETURNS_NULL ); ICompilerConfiguration compilerCfg = getBaseCompilerCfg(); when( cfg.getLoadConfig() ).thenReturn( new String[] {} ); when( cfg.getOutput() ).thenReturn( output.getAbsolutePath() ); when( cfg.getCompilerConfiguration() ).thenReturn( compilerCfg ); Assert.assertEquals( compiler.compileSwf( new MxmlcConfigurationHolder( cfg, new File( as3, "main.as" ) ), true, null ).getExitCode(), 0 ); Assert.assertTrue( output.exists(), logger.getLogs().toString() ); }