code: protected void compileModule(Module module, Path moduleCompilationRoot) throws ScriptCompilationException, IOException {
          // compile the script archive for the module, and inject the resultant classes into
          // the ModuleClassLoader
          ModuleClassLoader moduleClassLoader = module.getClassLoader();
          if (moduleClassLoader instanceof JBossModuleClassLoader) {
              JBossModuleClassLoader jBossModuleClassLoader = (JBossModuleClassLoader)moduleClassLoader;
              ScriptArchive scriptArchive = jBossModuleClassLoader.getScriptArchive();
              List<ScriptArchiveCompiler> candidateCompilers = findCompilers(scriptArchive);
              if (candidateCompilers.size() == 0) {
                  throw new ScriptCompilationException("Could not find a suitable compiler for this archive.");
              }
  
              // Compile iteratively
              for (ScriptArchiveCompiler compiler: candidateCompilers) {
                  compiler.compile(scriptArchive, jBossModuleClassLoader, moduleCompilationRoot);
              }
          }
      }
docs: Compiles and links the scripts within the module by locating the correct compiler
  and delegating the compilation. the classes will be loaded into the module's classloader
  upon completion.
  @param module module to be compiled
  @param moduleCompilationRoot the directory to store compiled classes in.