Search in sources :

Example 1 with JULLogger

use of com.developmentontheedge.be5.metadata.util.JULLogger in project be5 by DevelopmentOnTheEdge.

the class ModuleLoader2 method findAndLoadProjectWithModules.

public static Project findAndLoadProjectWithModules() throws ProjectLoadException {
    loadAllProjects(true);
    Project project = null;
    for (Map.Entry<String, Project> module : modulesMap.entrySet()) {
        if (module.getValue() != null && !module.getValue().isModuleProject()) {
            if (project != null) {
                throw new RuntimeException("Several projects were found: " + project + ", " + module);
            } else {
                project = module.getValue();
            }
        }
    }
    if (project == null) {
        // todo create new not module project for tests?
        log.info("Project not found, try load main module.");
        project = new ProjectTopologicalSort(modulesMap.values()).getRoot();
    }
    ModuleLoader2.mergeModules(project, new JULLogger(log));
    return project;
}
Also used : Project(com.developmentontheedge.be5.metadata.model.Project) JULLogger(com.developmentontheedge.be5.metadata.util.JULLogger) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

Project (com.developmentontheedge.be5.metadata.model.Project)1 JULLogger (com.developmentontheedge.be5.metadata.util.JULLogger)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1