You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rc...@apache.org on 2020/03/06 03:07:12 UTC
[james-project] 11/21: JAMES-3058 Define Cassandra specific routes
directly in Cassandra product
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 562b933c5cca18237edc9aeef5b6b5324ca3753e
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Feb 14 14:22:24 2020 +0700
JAMES-3058 Define Cassandra specific routes directly in Cassandra product
---
server/container/guice/cassandra-guice/pom.xml | 6 +--
.../org/apache/james/CassandraJamesServerMain.java | 6 +--
.../modules/webadmin}/CassandraRoutesModule.java | 2 +-
.../InconsistencySolvingRoutesModule.java} | 20 +++++---
server/container/guice/pom.xml | 12 -----
.../protocols/webadmin-cassandra-data/pom.xml | 50 --------------------
.../guice/protocols/webadmin-cassandra/pom.xml | 53 ----------------------
7 files changed, 20 insertions(+), 129 deletions(-)
diff --git a/server/container/guice/cassandra-guice/pom.xml b/server/container/guice/cassandra-guice/pom.xml
index 01219bb..71649de 100644
--- a/server/container/guice/cassandra-guice/pom.xml
+++ b/server/container/guice/cassandra-guice/pom.xml
@@ -220,15 +220,15 @@
</dependency>
<dependency>
<groupId>${james.groupId}</groupId>
- <artifactId>james-server-guice-webadmin-cassandra</artifactId>
+ <artifactId>james-server-guice-webadmin-data</artifactId>
</dependency>
<dependency>
<groupId>${james.groupId}</groupId>
- <artifactId>james-server-guice-webadmin-cassandra-data</artifactId>
+ <artifactId>james-server-webadmin-cassandra</artifactId>
</dependency>
<dependency>
<groupId>${james.groupId}</groupId>
- <artifactId>james-server-guice-webadmin-data</artifactId>
+ <artifactId>james-server-webadmin-cassandra-data</artifactId>
</dependency>
<dependency>
<groupId>${james.groupId}</groupId>
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
index 1f5cd85..49a3a86 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
@@ -51,8 +51,6 @@ import org.apache.james.modules.protocols.ManageSieveServerModule;
import org.apache.james.modules.protocols.POP3ServerModule;
import org.apache.james.modules.protocols.ProtocolHandlerModule;
import org.apache.james.modules.protocols.SMTPServerModule;
-import org.apache.james.modules.server.CassandraDataRoutesModules;
-import org.apache.james.modules.server.CassandraRoutesModule;
import org.apache.james.modules.server.DKIMMailetModule;
import org.apache.james.modules.server.DLPRoutesModule;
import org.apache.james.modules.server.DataRoutesModules;
@@ -70,6 +68,8 @@ import org.apache.james.modules.server.TaskManagerModule;
import org.apache.james.modules.server.WebAdminServerModule;
import org.apache.james.modules.spamassassin.SpamAssassinListenerModule;
import org.apache.james.modules.vault.DeletedMessageVaultRoutesModule;
+import org.apache.james.modules.webadmin.CassandraRoutesModule;
+import org.apache.james.modules.webadmin.InconsistencySolvingRoutesModule;
import org.apache.james.server.core.configuration.Configuration;
import com.google.common.collect.ImmutableSet;
@@ -82,10 +82,10 @@ public class CassandraJamesServerMain {
public static final Module WEBADMIN = Modules.combine(
new CassandraRoutesModule(),
- new CassandraDataRoutesModules(),
new DataRoutesModules(),
new DeletedMessageVaultRoutesModule(),
new DLPRoutesModule(),
+ new InconsistencySolvingRoutesModule(),
new JmapTasksModule(),
new MailboxRoutesModule(),
new MailQueueRoutesModule(),
diff --git a/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/webadmin/CassandraRoutesModule.java
similarity index 99%
rename from server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java
rename to server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/webadmin/CassandraRoutesModule.java
index a4bdd83..8812df0 100644
--- a/server/container/guice/protocols/webadmin-cassandra/src/main/java/org/apache/james/modules/server/CassandraRoutesModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/webadmin/CassandraRoutesModule.java
@@ -17,7 +17,7 @@
* under the License. *
****************************************************************/
-package org.apache.james.modules.server;
+package org.apache.james.modules.webadmin;
import org.apache.james.backends.cassandra.migration.CassandraMigrationService;
import org.apache.james.backends.cassandra.migration.Migration;
diff --git a/server/container/guice/protocols/webadmin-cassandra-data/src/main/java/org/apache/james/modules/server/CassandraDataRoutesModules.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/webadmin/InconsistencySolvingRoutesModule.java
similarity index 70%
rename from server/container/guice/protocols/webadmin-cassandra-data/src/main/java/org/apache/james/modules/server/CassandraDataRoutesModules.java
rename to server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/webadmin/InconsistencySolvingRoutesModule.java
index 8c2b4ee..fc49a21 100644
--- a/server/container/guice/protocols/webadmin-cassandra-data/src/main/java/org/apache/james/modules/server/CassandraDataRoutesModules.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/webadmin/InconsistencySolvingRoutesModule.java
@@ -17,7 +17,7 @@
* under the License. *
****************************************************************/
-package org.apache.james.modules.server;
+package org.apache.james.modules.webadmin;
import org.apache.james.webadmin.Routes;
import org.apache.james.webadmin.routes.CassandraMappingsRoutes;
@@ -27,14 +27,20 @@ import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import com.google.inject.multibindings.Multibinder;
-public class CassandraDataRoutesModules extends AbstractModule {
+public class InconsistencySolvingRoutesModule extends AbstractModule {
+ public static class SolveRRTInconsistenciesModules extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(CassandraMappingsRoutes.class).in(Scopes.SINGLETON);
+ bind(CassandraMappingsService.class).in(Scopes.SINGLETON);
+
+ Multibinder<Routes> routesMultibinder = Multibinder.newSetBinder(binder(), Routes.class);
+ routesMultibinder.addBinding().to(CassandraMappingsRoutes.class);
+ }
+ }
@Override
protected void configure() {
- bind(CassandraMappingsRoutes.class).in(Scopes.SINGLETON);
- bind(CassandraMappingsService.class).in(Scopes.SINGLETON);
-
- Multibinder<Routes> routesMultibinder = Multibinder.newSetBinder(binder(), Routes.class);
- routesMultibinder.addBinding().to(CassandraMappingsRoutes.class);
+ install(new SolveRRTInconsistenciesModules());
}
}
diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml
index 9cefaf5..a7d55fd 100644
--- a/server/container/guice/pom.xml
+++ b/server/container/guice/pom.xml
@@ -66,8 +66,6 @@
<module>protocols/pop</module>
<module>protocols/smtp</module>
<module>protocols/webadmin</module>
- <module>protocols/webadmin-cassandra</module>
- <module>protocols/webadmin-cassandra-data</module>
<module>protocols/webadmin-data</module>
<module>protocols/webadmin-jmap</module>
<module>protocols/webadmin-mailbox</module>
@@ -182,16 +180,6 @@
</dependency>
<dependency>
<groupId>${james.groupId}</groupId>
- <artifactId>james-server-guice-webadmin-cassandra</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>james-server-guice-webadmin-cassandra-data</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${james.groupId}</groupId>
<artifactId>james-server-guice-webadmin-data</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/server/container/guice/protocols/webadmin-cassandra-data/pom.xml b/server/container/guice/protocols/webadmin-cassandra-data/pom.xml
deleted file mode 100644
index 164eebe..0000000
--- a/server/container/guice/protocols/webadmin-cassandra-data/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.james</groupId>
- <artifactId>james-server-guice</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>james-server-guice-webadmin-cassandra-data</artifactId>
-
- <name>Apache James :: Server :: Guice :: Webadmin :: Cassandra :: Data</name>
- <description>Webadmin cassandra data modules for Guice implementation of James server</description>
-
- <dependencies>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>james-server-webadmin-cassandra-data</artifactId>
- </dependency>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>testing-base</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.google.inject</groupId>
- <artifactId>guice</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
diff --git a/server/container/guice/protocols/webadmin-cassandra/pom.xml b/server/container/guice/protocols/webadmin-cassandra/pom.xml
deleted file mode 100644
index 55d0760..0000000
--- a/server/container/guice/protocols/webadmin-cassandra/pom.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.james</groupId>
- <artifactId>james-server-guice</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>james-server-guice-webadmin-cassandra</artifactId>
-
- <name>Apache James :: Server :: Guice :: Webadmin :: Cassandra</name>
- <description>Webadmin cassandra modules for Guice implementation of James server</description>
-
- <dependencies>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>james-server-webadmin-cassandra</artifactId>
- </dependency>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>james-server-data-cassandra</artifactId>
- </dependency>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>testing-base</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.google.inject</groupId>
- <artifactId>guice</artifactId>
- </dependency>
- </dependencies>
-</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org