anchor.diff:                      ok
               end,
   
  +            %% Get the list of plug-in modules from rebar.config. These modules are
  +            %% processed LAST and do not participate in preprocess.
  +            {ok, PluginModules} = plugin_modules(UpdatedConfig),
  +
               %% Finally, process the current working directory
  -            ?DEBUG("Commands: ~p Modules: ~p\n", [Commands, Modules]),
  -            apply_commands(Commands, Modules, UpdatedConfig, ModuleSetFile),
  +            ?DEBUG("Commands: ~p Modules: ~p Plugins: ~p\n", [Commands, Modules, PluginModules]),
  +            apply_commands(Commands, Modules ++ PluginModules, UpdatedConfig, ModuleSetFile),
   
               %% Once we're all done processing, reset the code path to whatever
               %% the parent initialized it to
  
positive.code:             %% type. These any_dir modules are processed FIRST.
              {ok, AnyDirModules} = application:get_env(rebar, any_dir_modules),
  
              %% Get the list of plug-in modules from rebar.config. These modules are
              %% processed LAST.
              {ok, PluginModules} = plugin_modules(Config),
  
              Modules = AnyDirModules ++ DirModules ++ PluginModules,
  
              %% Give the modules a chance to tweak config and indicate if there
              %% are any other dirs that might need processing first.
              {UpdatedConfig, Dirs} = acc_modules(select_modules(Modules, preprocess, []),
                                                  preprocess, Config, ModuleSetFile, []),
              ?DEBUG("~s subdirs: ~p\n", [Dir, Dirs]),
              [process_dir(D, UpdatedConfig, Commands) || D <- Dirs],
  
              %% Make sure the CWD is reset properly; processing subdirs may have caused it
  
negative.code:             ?DEBUG("Missing plugins: ~p\n", [Modules -- FoundModules]),
              ok
      end,
      {ok, ulist(FoundModules)}.
  
  %%
  %% Return .app file if the current directory is an OTP app
  