Internal API used to resolve a given compilation unit. Can run a subset of the compilation process
435714
public CompilationUnitDeclaration resolve(
            CompilationUnitDeclaration unit,
            ICompilationUnit sourceUnit,
            boolean verifyMethods,
            boolean analyzeCode,
            boolean generateCode) {

        try {
            if (unit == null) {
                // build and record parsed units
                this.parseThreshold = 0; // will request a full parse
                beginToCompile(new ICompilationUnit[] { sourceUnit });
                // find the right unit from what was injected via accept(ICompilationUnit,..):
                for (int i=0; i<this.totalUnits; i++) {
                    if (   this.unitsToProcess[i] != null
                        && this.unitsToProcess[i].compilationResult.compilationUnit == sourceUnit)
                    {
                        unit = this.unitsToProcess[i];
                        break;
                    }
                }
                if (unit == null)
                    unit = this.unitsToProcess[0]; // fall back to old behavior

            } else {
                // initial type binding creation
                this.lookupEnvironment.buildTypeBindings(unit, null /*no access restriction*/);

                // binding resolution
                this.lookupEnvironment.completeTypeBindings();
            }
            this.lookupEnvironment.unitBeingCompleted = unit;
            this.parser.getMethodBodies(unit);
            if (unit.scope != null) {
                // fault in fields & methods
                unit.scope.faultInTypes();
                if (unit.scope != null && verifyMethods) {
                    // http://dev.eclipse.org/bugs/show_bug.cgi?id=23117
                     // verify inherited methods
                    unit.scope.verifyMethods(this.lookupEnvironment.methodVerifier());
                }
                // type checking
                unit.resolve();

                // flow analysis
                if (analyzeCode) unit.analyseCode();

                // code generation
                if (generateCode) unit.generateCode();

                // finalize problems (suppressWarnings)
                unit.finalizeProblems();
            }
            if (this.unitsToProcess != null) this.unitsToProcess[0] = null; // release reference to processed unit declaration
            this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());
            return unit;
        } catch (AbortCompilation e) {
            this.handleInternalException(e, unit);
            return unit == null ? this.unitsToProcess[0] : unit;
        } catch (Error e) {
            this.handleInternalException(e, unit, null);
            throw e; // rethrow
        } catch (RuntimeException e) {
            this.handleInternalException(e, unit, null);
            throw e; // rethrow
        } finally {
            // leave this.lookupEnvironment.unitBeingCompleted set to the unit, until another unit is resolved
            // other calls to dom can cause classpath errors to be detected, resulting in AbortCompilation exceptions

            // No reset is performed there anymore since,
            // within the CodeAssist (or related tools),
            // the compiler may be called *after* a call
            // to this resolve(...) method. And such a call
            // needs to have a compiler with a non-empty
            // environment.
            // this.reset();
        }
    }
915131
private void compile(ICompilationUnit[] sourceUnits, boolean lastRound) {
        this.stats.startTime = System.currentTimeMillis();
        try {
            // build and record parsed units
            reportProgress(Messages.compilation_beginningToCompile);

            if (this.options.complianceLevel >= ClassFileConstants.JDK9) {
                // in Java 9 the compiler must never ask the oracle for a module that is contained in the input units:
                sortModuleDeclarationsFirst(sourceUnits);
            }
            if (this.annotationProcessorManager == null) {
                beginToCompile(sourceUnits);
            } else {
                ICompilationUnit[] originalUnits = sourceUnits.clone(); // remember source units in case a source type collision occurs
                try {
                    beginToCompile(sourceUnits);
                    if (!lastRound) {
                        processAnnotations();
                    }
                    if (!this.options.generateClassFiles) {
                        // -proc:only was set on the command line
                        return;
                    }
                } catch (SourceTypeCollisionException e) {
                    backupAptProblems();
                    reset();
                    // a generated type was referenced before it was created
                    // the compiler either created a MissingType or found a BinaryType for it
                    // so add the processor's generated files & start over,
                    // but remember to only pass the generated files to the annotation processor
                    int originalLength = originalUnits.length;
                    int newProcessedLength = e.newAnnotationProcessorUnits.length;
                    ICompilationUnit[] combinedUnits = new ICompilationUnit[originalLength + newProcessedLength];
                    System.arraycopy(originalUnits, 0, combinedUnits, 0, originalLength);
                    System.arraycopy(e.newAnnotationProcessorUnits, 0, combinedUnits, originalLength, newProcessedLength);
                    this.annotationProcessorStartIndex  = originalLength;
                    compile(combinedUnits, e.isLastRound);
                    return;
                }
            }
            // Restore the problems before the results are processed and cleaned up.
            restoreAptProblems();
            processCompiledUnits(0, lastRound);
        } catch (AbortCompilation e) {
            this.handleInternalException(e, null);
        }
        if (this.options.verbose) {
            if (this.totalUnits > 1) {
                this.out.println(
                        Messages.bind(Messages.compilation_units, String.valueOf(this.totalUnits)));
            } else {
                this.out.println(
                        Messages.bind(Messages.compilation_unit, String.valueOf(this.totalUnits)));
            }
        }
    }
317113
@Override
    ResolveResult<? extends AbstractConfigValue> resolveSubstitutions(ResolveContext context, ResolveSource source) {
        ResolveContext newContext = context.addCycleMarker(this);
        AbstractConfigValue v;
        try {
            ResolveSource.ResultWithPath resultWithPath = source.lookupSubst(newContext, expr, prefixLength);
            newContext = resultWithPath.result.context;

            if (resultWithPath.result.value != null) {
                if (ConfigImpl.traceSubstitutionsEnabled())
                    ConfigImpl.trace(newContext.depth(), "recursively resolving " + resultWithPath
                            + " which was the resolution of " + expr + " against " + source);

                ResolveSource recursiveResolveSource = (new ResolveSource(
                        (AbstractConfigObject) resultWithPath.pathFromRoot.last(), resultWithPath.pathFromRoot));

                if (ConfigImpl.traceSubstitutionsEnabled())
                    ConfigImpl.trace(newContext.depth(), "will recursively resolve against " + recursiveResolveSource);

                ResolveResult<? extends AbstractConfigValue> result = newContext.resolve(resultWithPath.result.value,
                        recursiveResolveSource);
                v = result.value;
                newContext = result.context;
            } else {
                ConfigValue fallback = context.options().getResolver().lookup(expr.path().render());
                v = (AbstractConfigValue) fallback;
            }
        } catch (NotPossibleToResolve e) {
            if (ConfigImpl.traceSubstitutionsEnabled())
                ConfigImpl.trace(newContext.depth(),
                        "not possible to resolve " + expr + ", cycle involved: " + e.traceString());
            if (expr.optional())
                v = null;
            else
                throw new ConfigException.UnresolvedSubstitution(origin(), expr
                        + " was part of a cycle of substitutions involving " + e.traceString(), e);
        }

        if (v == null && !expr.optional()) {
            if (newContext.options().getAllowUnresolved())
                return ResolveResult.make(newContext.removeCycleMarker(this), this);
            else
                throw new ConfigException.UnresolvedSubstitution(origin(), expr.toString());
        } else {
            return ResolveResult.make(newContext.removeCycleMarker(this), v);
        }
    }
218556
function _resolvePackageSync(base, relativePath) {
    var packageJsonPath;
    var packagePath;

    // try to fetch node package
    try {
        packageJsonPath = _resolvePackagePathSync(base, PATH.join(relativePath, 'package.json'));
        packagePath = dirname(packageJsonPath);
    } catch (err) {
        if (err.code !== 'ENOENT') {
            throw err;
        }

        // try to resolve package itself
        packagePath = _resolvePackagePathSync(base, relativePath);
    }

    // compiling resolved metadata
    var packageJson = packageJsonPath && require(packageJsonPath) || {};
    var metadata = packageJson.pym || {};

    metadata.interface =
        metadata.interface ||
        packageJson.pym ? 'pym' :
        packageJson.plugin ? 'architect' :
        // what 'bout amd?
        'commonjs';

    // load package itself
    var packageMainPath;
    var nodeModule;
    switch (metadata.interface) {
        case 'pym':
            packageMainPath = PATH.join(packagePath, metadata.main || packageJson.main);
            nodeModule = require(packageMainPath);
            metadata.provides = metadata.provides || nodeModule.provides || [];
            metadata.consumes = metadata.consumes || nodeModule.consumes || [];
            metadata.packagePath = packagePath;
            metadata.exports = nodeModule;
            break;
        case 'architect':
            var pluginData = packageJson.plugin || {};
            nodeModule = require(packagePath);
            metadata.provides = pluginData.provides || nodeModule.provides || [];
            metadata.consumes = pluginData.consumes || nodeModule.consumes || [];
            metadata.packagePath = packagePath;
            metadata.exports = _wrapToArchitect(nodeModule, metadata);
            break;
        default:
            throw new Error('Unsupported package format ' + relativePath);
    }

    return metadata;
}
1085849
public Result compile(SourceFile extern, SourceFile input, CompilerOptions options) {
    return compile(ImmutableList.of(extern), ImmutableList.of(input), options);
  }
459332
def _resolve(cls, path, factory_file):
        
        variables = {}

        name = factory_file
        factory_file = os.path.join(path, factory_file)

        with open(factory_file) as fh:
            exec(fh.read(), {}, variables)

        klass = variables[inflection.camelize(name)]

        instance = klass()

        return instance
64826
function resolve(deps, rem) {
    var i, length, dep, mod, result = [];

    for (i = 0, length = deps.length; i < length; i++) {
      dep = deps[i];
      mod = cache[dep] || rem[dep];

      if (!mod) {
        throw new TypeError("Module " + dep + " has not yet been loaded");
      }

      if (cache[dep]) {
        if (!mod.hasOwnProperty("code")) {
          mod.code = load(mod);
        }
        result[i] = mod.code;
      }
      else {
        result[i] = mod;
      }
    }

    return result;
  }
1014113
private void compile(AssetInfo asset, File source, File target) throws ServiceException {
        File watched = watchedAssets.get(asset);
        if (watched == null) {
            if (isDevMode()) {
                new Thread(() -> {
                    try {
                        // avoid recursive compiles
                        if (isDevMode())
                            watchedAssets.put(asset, target);
                        doCompile(asset, source, target);
                    }
                    catch (Exception ex) {
                        logger.severeException(ex.getMessage(), ex);
                    }
                }).start();
            }
            else {
                doCompile(asset, source, target);
            }
        }
    }
307276
protected void internalExecute()
        throws MojoExecutionException, MojoFailureException
    {
        List<String> compileSourceRoots = getCompileSourceRoots();

        if ( compileSourceRoots.isEmpty() )// ?
        {
            getLog().info( "No sources to compile" );

            return;
        }

        List<File> sourceRootDirs = new ArrayList<File>( compileSourceRoots.size() );
        for ( String compileSourceRoot : compileSourceRoots )
        {
            sourceRootDirs.add( new File( compileSourceRoot ) );
        }

        List<File> sourceFiles = getSourceFiles( sourceRootDirs );
        if ( sourceFiles.isEmpty() )
        {
            getLog().info( "No sources to compile" );

            return;
        }

        try
        {
            Compiler sbtCompiler = getSbtCompiler();
            
            String resolvedScalaVersion = getScalaVersion( sbtCompiler );

            Artifact scalaLibraryArtifact =
                getResolvedArtifact( SCALA_GROUPID, SCALA_LIBRARY_ARTIFACTID, resolvedScalaVersion );
            if ( scalaLibraryArtifact == null )
            {
                throw new MojoExecutionException( String.format( "Required %s:%s:%s:jar artifact not found",
                                                                 SCALA_GROUPID, SCALA_LIBRARY_ARTIFACTID,
                                                                 resolvedScalaVersion ) );
            }

            Artifact scalaCompilerArtifact =
                getResolvedArtifact( SCALA_GROUPID, SCALA_COMPILER_ARTIFACTID, resolvedScalaVersion );
            if ( scalaCompilerArtifact == null )
            {
                throw new MojoExecutionException( String.format( "Required %s:%s:%s:jar artifact not found",
                                                                 SCALA_GROUPID, SCALA_COMPILER_ARTIFACTID,
                                                                 resolvedScalaVersion ) );
            }

            List<File> scalaExtraJars = getCompilerDependencies( scalaCompilerArtifact, scalaLibraryArtifact );

            String resolvedSbtVersion = sbtCompiler.getDefaultSbtVersion();

            Artifact xsbtiArtifact = getResolvedArtifact( SBT_GROUP_ID, XSBTI_ARTIFACT_ID, resolvedSbtVersion );
            if ( xsbtiArtifact == null )
            {
                throw new MojoExecutionException( String.format( "Required %s:%s:%s:jar dependency not found",
                                                                 SBT_GROUP_ID, XSBTI_ARTIFACT_ID, resolvedSbtVersion ) );
            }

            Artifact compilerInterfaceSrc =
                getResolvedArtifact( SBT_GROUP_ID, COMPILER_INTERFACE_ARTIFACT_ID, resolvedSbtVersion,
                                     COMPILER_INTERFACE_CLASSIFIER );
            if ( compilerInterfaceSrc == null )
            {
                throw new MojoExecutionException( String.format( "Required %s:%s:%s:%s:jar dependency not found",
                                                                 SBT_GROUP_ID, COMPILER_INTERFACE_ARTIFACT_ID,
                                                                 resolvedSbtVersion, COMPILER_INTERFACE_CLASSIFIER ) );
            }

            List<String> classpathElements = getClasspathElements();
            classpathElements.remove( getOutputDirectory().getAbsolutePath() );
            List<File> classpathFiles = new ArrayList<File>( classpathElements.size() );
            for ( String path : classpathElements )
            {
                classpathFiles.add( new File( path ) );
            }

            String resolvedScalacOptions = scalacOptions.trim();
            if ( _scalacOptions != null && _scalacOptions.length() > 0 )
            {
                resolvedScalacOptions = resolvedScalacOptions + ' ' + _scalacOptions;
            }

            if ( ( scalacPlugins != null && scalacPlugins.trim().length() > 0 )
                || ( _scalacPlugins != null && _scalacPlugins.trim().length() > 0 ) )
            {
                List<Artifact> resolvedScalaCompilerPluginArtifacts = new ArrayList<Artifact>();
                resolveArtifacts( resolvedScalaCompilerPluginArtifacts, scalacPlugins );
                resolveArtifacts( resolvedScalaCompilerPluginArtifacts, _scalacPlugins );
                for ( Artifact artifact: resolvedScalaCompilerPluginArtifacts )
                {
                    String arg = "-Xplugin:" + artifact.getFile().getAbsolutePath();
                    if ( arg.indexOf( ' ' ) >= 0 )
                    {
                        arg = '\"' + arg + '\"';
                    }
                    resolvedScalacOptions = resolvedScalacOptions + ' ' + arg;
                }
            }

            SourcePositionMapper sourcePositionMapper = null;
            if ( sbtCompiler.supportsSourcePositionMappers() )
            {
                if ( ( sourcePositionMappers != null && sourcePositionMappers.trim().length() > 0 )
                    || ( _sourcePositionMappers != null && _sourcePositionMappers.trim().length() > 0 ) )
                {
                    List<Artifact> resolvedSourcePositionMapperArtifacts = new ArrayList<Artifact>();
                    resolveArtifacts( resolvedSourcePositionMapperArtifacts, sourcePositionMappers );
                    resolveArtifacts( resolvedSourcePositionMapperArtifacts, _sourcePositionMappers );
                    if ( !resolvedSourcePositionMapperArtifacts.isEmpty() )
                    {
                        Set<Artifact> resolvedSourcePositionMapperArtifactSet =
                            getAllDependencies( new HashSet<Artifact>( resolvedSourcePositionMapperArtifacts ), null /* filter */ );
                        List<SourcePositionMapper> resolvedSourcePositionMappers =
                            resolveSourcePositionMappers( resolvedSourcePositionMapperArtifactSet );
                        if ( resolvedSourcePositionMappers != null )
                        {
                            sourcePositionMapper = new SourcePositionMapperCollection( resolvedSourcePositionMappers );
                            sourcePositionMapper.setCharsetName( sourceEncoding );
                        }
                    }
                }
            }

            CompilerConfiguration configuration = new CompilerConfiguration();
            configuration.setSourceFiles( sourceFiles );
            configuration.setScalaLibraryFile( scalaLibraryArtifact.getFile() );
            configuration.setScalaCompilerFile( scalaCompilerArtifact.getFile() );
            configuration.setScalaExtraJarFiles( scalaExtraJars );
            configuration.setXsbtiFile( xsbtiArtifact.getFile() );
            configuration.setCompilerInterfaceSrcFile( compilerInterfaceSrc.getFile() );
            configuration.setClasspathFiles( classpathFiles );
            configuration.setLogger( new MavenCompilerLogger( getLog() ) );
            configuration.setOutputDirectory( getOutputDirectory() );
            configuration.setSourceEncoding( sourceEncoding );
            configuration.setJavacOptions( javacOptions );
            configuration.setScalacOptions( resolvedScalacOptions );
            configuration.setAnalysisCacheFile( getAnalysisCacheFile() );
            configuration.setAnalysisCacheMap( getAnalysisCacheMap() );
            configuration.setSourcePositionMapper( sourcePositionMapper );

            sbtCompiler.performCompile( configuration );
        }
        catch ( CompilerException e )
        {
            throw new MojoFailureException( "Scala compilation failed", e );
        }
        catch ( ArtifactNotFoundException e )
        {
            throw new MojoExecutionException( "Scala compilation failed", e );
        }
        catch ( ArtifactResolutionException e )
        {
            throw new MojoExecutionException( "Scala compilation failed", e );
        }
        catch ( MalformedURLException e )
        {
            throw new MojoExecutionException( "Scala compilation failed", e );
        }
    }
291286
function resolveResource(ref, baseURI){
    // ref ~ "#123"
    if (/^#\d+$/.test(ref))
      return templateList[ref.substr(1)];

    // ref ~ "id:foo"
    if (/^id:/.test(ref))
      return resolveSourceByDocumentId(ref.substr(3));

    // ref ~ "foo.bar.baz"
    if (/^[a-z0-9\.]+$/i.test(ref) && !/\.tmpl$/.test(ref))
      return getSourceByPath(ref);

    // ref ~ "./path/to/file.tmpl"
    return basis.resource(basis.resource.resolveURI(ref, baseURI, '<b:include src=\"{url}\"/>'));
  }
1276363
def compile(self, source_code, post_treatment=''.join, source='<string>', target='exec'): 
        """"""
        self.last_python_code = super().compile(source_code, post_treatment)
        return PyCompiler.executable(self.last_python_code, source, target)
1054402
def _upstream_analysis(self, compile_contexts, classpath_entries):
    """"""
    # Reorganize the compile_contexts by class directory.
    compile_contexts_by_directory = {}
    for compile_context in compile_contexts.values():
      compile_context = self.select_runtime_context(compile_context)
      compile_contexts_by_directory[compile_context.classes_dir.path] = compile_context
    # If we have a compile context for the target, include it.
    for entry in classpath_entries:
      path = entry.path
      if not path.endswith('.jar'):
        compile_context = compile_contexts_by_directory.get(path)
        if not compile_context:
          self.context.log.debug('Missing upstream analysis for {}'.format(path))
        else:
          yield compile_context.classes_dir.path, compile_context.analysis_file
911706
public final void compilationUnit() throws RecognitionException {
		int compilationUnit_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:270:5: ( ( annotations )? ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:270:7: ( annotations )? ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )*
			{
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:270:7: ( annotations )?
			int alt1=2;
			int LA1_0 = input.LA(1);
			if ( (LA1_0==58) ) {
				int LA1_1 = input.LA(2);
				if ( (LA1_1==Identifier) ) {
					int LA1_21 = input.LA(3);
					if ( (synpred1_Java()) ) {
						alt1=1;
					}
				}
			}
			switch (alt1) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:270:7: annotations
					{
					pushFollow(FOLLOW_annotations_in_compilationUnit81);
					annotations();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:271:9: ( packageDeclaration )?
			int alt2=2;
			int LA2_0 = input.LA(1);
			if ( (LA2_0==99) ) {
				alt2=1;
			}
			switch (alt2) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:271:9: packageDeclaration
					{
					pushFollow(FOLLOW_packageDeclaration_in_compilationUnit92);
					packageDeclaration();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:272:9: ( importDeclaration )*
			loop3:
			while (true) {
				int alt3=2;
				int LA3_0 = input.LA(1);
				if ( (LA3_0==89) ) {
					alt3=1;
				}

				switch (alt3) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:272:9: importDeclaration
					{
					pushFollow(FOLLOW_importDeclaration_in_compilationUnit103);
					importDeclaration();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop3;
				}
			}

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:273:9: ( typeDeclaration )*
			loop4:
			while (true) {
				int alt4=2;
				int LA4_0 = input.LA(1);
				if ( (LA4_0==ENUM||LA4_0==52||LA4_0==58||LA4_0==63||LA4_0==72||LA4_0==83||LA4_0==93||LA4_0==96||(LA4_0 >= 100 && LA4_0 <= 102)||(LA4_0 >= 106 && LA4_0 <= 107)||LA4_0==110||LA4_0==114||LA4_0==119) ) {
					alt4=1;
				}

				switch (alt4) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:273:9: typeDeclaration
					{
					pushFollow(FOLLOW_typeDeclaration_in_compilationUnit114);
					typeDeclaration();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop4;
				}
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 1, compilationUnit_StartIndex); }

		}
	}
1168133
protected void beginToCompile(ICompilationUnit[] sourceUnits) {
        int maxUnits = sourceUnits.length;
        this.totalUnits = 0;
        this.unitsToProcess = new CompilationUnitDeclaration[maxUnits];

        internalBeginToCompile(sourceUnits, maxUnits);
    }
379384
private Class<? extends ConsoleEditor> resolve(String flavor) throws EditorInitializationException {
        ClassLoader classLoader = getClass().getClassLoader();
        try {
            Enumeration<URL> urls = classLoader.getResources(RESOURCE_PATH + flavor);
            while (urls.hasMoreElements()) {
                URL url = urls.nextElement();
                String txt = Resources.toString(url);
                String[] jleditClasses = txt.split("\n");
                for (String jleditClass : jleditClasses) {
                    if (!jleditClass.isEmpty()) {
                        Class clazz = classLoader.loadClass(jleditClass);
                        if (ConsoleEditor.class.isAssignableFrom(clazz)) {
                            return clazz;
                        }
                    }
                }
            }
        } catch (Exception e) {
            throw new EditorInitializationException(e);
        }
        throw new EditorInitializationException("No Editor found for flavor:" + flavor);
    }
402527
def compile(source, options = {})
      source  = prepare_source(source)
      options = prepare_options(options)
      snippet = compilation_snippet \
        method:    "compile#{ "Client" if options[:client] }",
        arguments: [source, options],
        locals:    options.fetch(:locals, {}),
        options:   options
      result  = @execjs.eval(snippet)
      process_result(source, result, options)
    rescue ExecJS::ProgramError => e
      raise engine::CompilationError, e.message
    end
1007706
private String[] getClosureCompilerArgs(GlobalPostProcessingContext ctx, List<JoinableResourceBundle> tmpBundles,
			Map<String, String> resultBundlePathMapping) {

		List<String> args = new ArrayList<>();
		JawrConfig config = ctx.getJawrConfig();
		List<JoinableResourceBundle> bundles = new ArrayList<>(tmpBundles);

		// Handle All closure parameters defined in Jawr config
		initCompilerClosureArgumentsFromConfig(args, config);

		String excludedBundlesProp = config.getProperty(JAWR_JS_CLOSURE_BUNDLES_EXCLUDED, "");
		List<String> excludedBundles = Arrays
				.asList(excludedBundlesProp.replaceAll(" ", "").split(MODULE_DEPENDENCIES_SEPARATOR));

		// handle user specified modules
		Map<String, JoinableResourceBundle> bundleMap = new HashMap<>();
		for (JoinableResourceBundle bundle : bundles) {
			if (!excludedBundles.contains(bundle.getName())) {
				bundleMap.put(bundle.getName(), bundle);
			}
		}

		String modules = config.getProperty(JAWR_JS_CLOSURE_MODULES);
		List<String> depModulesArgs = new ArrayList<>();

		List<String> globalBundleDependencies = getGlobalBundleDependencies(ctx, excludedBundles);

		// Initialize the modules arguments
		initModulesArgs(resultBundlePathMapping, args, bundles, bundleMap, modules, depModulesArgs,
				globalBundleDependencies);

		// handle the other bundles
		for (JoinableResourceBundle bundle : bundles) {
			if (!excludedBundles.contains(bundle.getName())) {
				generateBundleModuleArgs(args, bundleMap, resultBundlePathMapping, bundle, globalBundleDependencies);
			}
		}

		// Add dependency modules args after to conform to dependency definition
		// of closure args
		args.addAll(depModulesArgs);

		if (LOGGER.isDebugEnabled()) {
			StringBuilder strArg = new StringBuilder();
			for (String arg : args) {
				strArg.append(arg).append(" ");
			}

			LOGGER.debug("Closure Compiler Args : " + strArg.toString());
		}
		return args.toArray(new String[] {});
	}