final ModifiableModuleModel moduleManager = createModuleManager(ideaProject);
final ModifiableRootModel module = createModule(moduleManager, leinProjectFile.getParent().getPath(), name);
initializeModulePaths(projectMap, module, leinProjectFile.getParent());
ProjectRootManagerEx rootManager = ProjectRootManagerEx.getInstanceEx(ideaProject);
module.setSdk(rootManager.getProjectSdk());
//Setup the dependencies
// Based loosely on org.jetbrains.idea.maven.importing.MavenRootModelAdapter#addLibraryDependency
//We could use the module table here, but then the libraries wouldn't be shared across modules.