use of org.eclipse.che.plugin.maven.server.MavenWrapperManager in project che by eclipse.
the class ClasspathManagerTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
Provider<ProjectRegistry> projectRegistryProvider = (Provider<ProjectRegistry>) mock(Provider.class);
when(projectRegistryProvider.get()).thenReturn(projectRegistry);
MavenServerManagerTest.MyMavenServerProgressNotifier mavenNotifier = new MavenServerManagerTest.MyMavenServerProgressNotifier();
MavenTerminal terminal = (level, message, throwable) -> {
System.out.println(message);
if (throwable != null) {
throwable.printStackTrace();
}
};
localRepository = new File(new File("target/localRepo").getAbsolutePath());
localRepository.mkdirs();
mavenServerManager.setLocalRepository(localRepository);
MavenWrapperManager wrapperManager = new MavenWrapperManager(mavenServerManager);
mavenProjectManager = new MavenProjectManager(wrapperManager, mavenServerManager, terminal, mavenNotifier, new EclipseWorkspaceProvider());
classpathManager = new ClasspathManager(root.getAbsolutePath(), wrapperManager, mavenProjectManager, terminal, mavenNotifier);
mavenWorkspace = new MavenWorkspace(mavenProjectManager, mavenNotifier, new MavenExecutorService(), projectRegistryProvider, new MavenCommunication() {
@Override
public void sendUpdateMassage(Set<MavenProject> updated, List<MavenProject> removed) {
}
@Override
public void sendNotification(NotificationMessage message) {
System.out.println(message.toString());
}
@Override
public void send(JsonObject object, MessageType type) {
}
}, classpathManager, eventService, new EclipseWorkspaceProvider());
}
use of org.eclipse.che.plugin.maven.server.MavenWrapperManager in project che by eclipse.
the class MavenProjectManagerTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
MavenWrapperManager wrapperManager = new MavenWrapperManager(manager);
projectManager = new MavenProjectManager(wrapperManager, manager, new MavenTerminalImpl(), new MavenServerManagerTest.MyMavenServerProgressNotifier(), workspaceProvider);
when(workspaceProvider.get()).thenReturn(workspace);
when(workspace.getRoot()).thenReturn(workspaceRoot);
}
Aggregations