Skip to content

Commit

Permalink
CHE-1083: Refactor modules registration (#1288)
Browse files Browse the repository at this point in the history
  • Loading branch information
azatsarynnyy committed May 19, 2016
1 parent 69eef13 commit 554182f
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 516 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,18 @@
import org.eclipse.che.api.core.notification.WSocketEventBusClient;
import org.eclipse.che.api.core.rest.ApiInfoService;
import org.eclipse.che.api.core.rest.CoreRestModule;
import org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule;
import org.eclipse.che.api.git.GitConnectionFactory;
import org.eclipse.che.api.git.GitUserResolver;
import org.eclipse.che.api.project.server.ProjectApiModule;
import org.eclipse.che.api.ssh.server.HttpSshServiceClient;
import org.eclipse.che.api.ssh.server.SshServiceClient;
import org.eclipse.che.api.user.server.dao.PreferenceDao;
import org.eclipse.che.api.vfs.VirtualFileSystemModule;
import org.eclipse.che.commons.lang.Pair;
import org.eclipse.che.everrest.CheAsynchronousJobPool;
import org.eclipse.che.git.impl.nativegit.LocalGitUserResolver;
import org.eclipse.che.git.impl.nativegit.NativeGitConnectionFactory;
import org.eclipse.che.inject.DynaModule;
import org.eclipse.che.plugin.github.server.inject.GitHubModule;
import org.eclipse.che.plugin.maven.generator.archetype.ArchetypeGenerator;
import org.eclipse.che.plugin.maven.generator.archetype.ArchetypeGeneratorModule;
import org.eclipse.che.plugin.maven.server.inject.MavenModule;
import org.eclipse.che.security.oauth.RemoteOAuthTokenProvider;
import org.everrest.core.impl.async.AsynchronousJobPool;
import org.everrest.core.impl.async.AsynchronousJobService;
Expand All @@ -65,16 +61,11 @@ protected void configure() {
.to(org.eclipse.che.git.impl.nativegit.ssh.SshKeyProviderImpl.class);

install(new CoreRestModule());
install(new VirtualFileSystemModule());
install(new FileCleanerModule());
install(new ProjectApiModule());
install(new MavenModule());
install(new ArchetypeGeneratorModule());
install(new GitHubModule());
install(new org.eclipse.che.swagger.deploy.DocsModule());
install(new org.eclipse.che.api.debugger.server.DebuggerModule());

bind(ArchetypeGenerator.class);

bind(GitUserResolver.class).to(LocalGitUserResolver.class);
bind(GitConnectionFactory.class).to(NativeGitConnectionFactory.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ protected void configure() {
bind(org.eclipse.che.api.machine.server.terminal.MachineTerminalLauncher.class);

install(new org.eclipse.che.api.core.rest.CoreRestModule());
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.local.LocalInfrastructureModule());
Expand Down
4 changes: 0 additions & 4 deletions core/che-core-api-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-env</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-inject</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-json</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
*******************************************************************************/
package org.eclipse.che.api.core.util;

import org.eclipse.che.commons.lang.IoUtil;
import org.eclipse.che.commons.lang.Pair;
import org.eclipse.che.inject.DynaModule;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.google.inject.AbstractModule;

import org.eclipse.che.commons.lang.IoUtil;
import org.eclipse.che.commons.lang.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -97,7 +96,6 @@ private static void clean() {
}

/** Guice module that stops FileCleaner when Guice container destroyed. */
@DynaModule
public static class FileCleanerModule extends AbstractModule {
@Override
protected void configure() {
Expand Down
4 changes: 4 additions & 0 deletions plugins/plugin-github/che-plugin-github-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-env</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-inject</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-json</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import org.eclipse.che.api.project.server.importer.ProjectImporter;
import org.eclipse.che.git.impl.nativegit.ssh.SshKeyUploader;
import org.eclipse.che.inject.DynaModule;
import org.eclipse.che.plugin.github.server.GitHubDTOFactory;
import org.eclipse.che.plugin.github.server.GitHubFactory;
import org.eclipse.che.plugin.github.server.GitHubKeyUploader;
Expand All @@ -26,6 +27,7 @@
*
* @author Andrey Plotnikov
*/
@DynaModule
public class GitHubModule extends AbstractModule {

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
Expand All @@ -50,10 +46,6 @@
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-core</artifactId>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions plugins/plugin-maven/che-plugin-maven-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-workspace-shared</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-inject</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-lang</artifactId>
Expand Down

0 comments on commit 554182f

Please sign in to comment.