// Load modules from modules/ directory, but get the order from the dependencies.yml file
// .listFiles() returns items in an OS dependant sequence, which is bad
// See #781
// the yaml parser wants yalp.version as an environment variable
System.setProperty("yalp.version", Yalp.version);
DependenciesManager dm = new DependenciesManager(applicationPath, frameworkPath, null);
File localModules = Yalp.getFile("modules");
List<String> modules = new ArrayList<String>();
if (localModules.exists() && localModules.isDirectory()) {
try {
modules = dm.retrieveModules();
} catch (Exception e) {
throw new UnexpectedException("There was a problem parsing dependencies.yml");
}
for (Iterator iter = modules.iterator(); iter.hasNext(); ) {