Skip to content

Commit

Permalink
Merge pull request #53 from codenvy/CHE-3720
Browse files Browse the repository at this point in the history
CHE-3720: Decouple different agents on different maven modules
  • Loading branch information
Anatoliy Bazko authored Jan 25, 2017
2 parents 31f1a40 + 9dc2c00 commit 1b845b8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
36 changes: 36 additions & 0 deletions assembly/openshift-plugin-assembly-wsmaster-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,38 @@
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>exec-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>ls-csharp-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>ls-json-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>ls-php-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>ls-python-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>ls-typescript-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>ssh-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che</groupId>
<artifactId>unison-agent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-auth</artifactId>
Expand Down Expand Up @@ -102,6 +134,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-db-vendor-h2</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>wsagent</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>wsmaster-local</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.google.inject.name.Names;

import org.eclipse.che.api.agent.server.launcher.AgentLauncher;
import org.eclipse.che.api.agent.shared.model.Agent;
import org.eclipse.che.api.core.rest.CheJsonProvider;
import org.eclipse.che.api.core.rest.MessageBodyAdapter;
import org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor;
Expand Down Expand Up @@ -106,12 +107,27 @@ protected void configure() {

bind(org.eclipse.che.api.workspace.server.event.MachineStateListener.class).asEagerSingleton();

bind(org.eclipse.che.api.agent.server.AgentRegistry.class).to(org.eclipse.che.api.agent.server.impl.LocalAgentRegistryImpl.class);
// agents
bind(org.eclipse.che.api.agent.server.AgentRegistryService.class);

Multibinder<AgentLauncher> agentLaunchers = Multibinder.newSetBinder(binder(), AgentLauncher.class);
agentLaunchers.addBinding().to(org.eclipse.che.api.workspace.server.launcher.WsAgentLauncherImpl.class);
agentLaunchers.addBinding().to(org.eclipse.che.api.workspace.server.launcher.TerminalAgentLauncherImpl.class);
agentLaunchers.addBinding().to(org.eclipse.che.api.workspace.server.launcher.SshAgentLauncherImpl.class);
bind(org.eclipse.che.api.agent.server.AgentRegistry.class).to(org.eclipse.che.api.agent.server.impl.AgentRegistryImpl.class);

Multibinder<Agent> agents = Multibinder.newSetBinder(binder(), Agent.class);
agents.addBinding().to(org.eclipse.che.api.agent.SshAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.UnisonAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.ExecAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.WsAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSPhpAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSPythonAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSJsonAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSCSharpAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSTypeScriptAgent.class);

Multibinder<AgentLauncher> launchers = Multibinder.newSetBinder(binder(), AgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.WsAgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.ExecAgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.SshMachineExecAgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.SshAgentLauncher.class);

bind(org.eclipse.che.api.deploy.WsMasterAnalyticsAddresser.class);

Expand All @@ -126,7 +142,6 @@ protected void configure() {
install(new org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule());
install(new org.eclipse.che.plugin.docker.machine.local.LocalDockerModule());
install(new org.eclipse.che.api.machine.server.MachineModule());
install(new org.eclipse.che.api.agent.server.AgentModule());
install(new org.eclipse.che.plugin.docker.machine.ext.DockerExtServerModule());
install(new org.eclipse.che.swagger.deploy.DocsModule());
install(new org.eclipse.che.plugin.machine.ssh.SshMachineModule());
Expand Down

0 comments on commit 1b845b8

Please sign in to comment.