diff --git a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/AbstractLibertyPluginSWTBotTest.java b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/AbstractLibertyPluginSWTBotTest.java index bd420222..ebef6a0a 100644 --- a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/AbstractLibertyPluginSWTBotTest.java +++ b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/AbstractLibertyPluginSWTBotTest.java @@ -126,14 +126,24 @@ public static void importMavenProjects(File workspaceRoot, List folders) // Get the list of projects to install. MavenModelManager modelManager = MavenPlugin.getMavenModelManager(); - LocalProjectScanner lps = new LocalProjectScanner(folders, false, modelManager); - lps.run(new NullProgressMonitor()); - List projects = lps.getProjects(); - - // Import the projects. - ProjectImportConfiguration projectImportConfig = new ProjectImportConfiguration(); - IProjectConfigurationManager projectConfigurationManager = MavenPlugin.getProjectConfigurationManager(); - projectConfigurationManager.importProjects(projects, projectImportConfig, new NullProgressMonitor()); + + for (String folder : folders) { + ArrayList folderList = new ArrayList(); + folderList.add(folder); + + LocalProjectScanner lps = new LocalProjectScanner(folderList, false, modelManager); + lps.run(new NullProgressMonitor()); + List projects = lps.getProjects(); + + try { + // Import the projects. + ProjectImportConfiguration projectImportConfig = new ProjectImportConfiguration(); + IProjectConfigurationManager projectConfigurationManager = MavenPlugin.getProjectConfigurationManager(); + projectConfigurationManager.importProjects(projects, projectImportConfig, new NullProgressMonitor()); + } catch (Exception e) { + e.printStackTrace(); + } + } } /**