This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push: new 17a2857b75 [FIX] Ship mail over web webadmin routes into more apps (#2099) 17a2857b75 is described below commit 17a2857b759f14a314987b870b3a3cb1ab32ba97 Author: Benoit TELLIER <btell...@linagora.com> AuthorDate: Mon Mar 11 07:40:41 2024 +0100 [FIX] Ship mail over web webadmin routes into more apps (#2099) --- server/apps/jpa-app/pom.xml | 4 ++ .../java/org/apache/james/JPAJamesServerMain.java | 4 +- server/apps/jpa-smtp-app/pom.xml | 4 ++ .../java/org/apache/james/JPAJamesServerMain.java | 4 +- server/apps/memory-app/pom.xml | 4 ++ .../org/apache/james/MemoryJamesServerMain.java | 4 +- server/apps/scaling-pulsar-smtp/pom.xml | 4 ++ .../src/main/java/org/apache/james/Main.java | 75 ++++++++++------------ 8 files changed, 60 insertions(+), 43 deletions(-) diff --git a/server/apps/jpa-app/pom.xml b/server/apps/jpa-app/pom.xml index 5d8e063e74..46dc45246b 100644 --- a/server/apps/jpa-app/pom.xml +++ b/server/apps/jpa-app/pom.xml @@ -140,6 +140,10 @@ <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-data</artifactId> </dependency> + <dependency> + <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-webadmin-mail-over-web</artifactId> + </dependency> <dependency> <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-mailbox</artifactId> diff --git a/server/apps/jpa-app/src/main/java/org/apache/james/JPAJamesServerMain.java b/server/apps/jpa-app/src/main/java/org/apache/james/JPAJamesServerMain.java index 47f53c63ae..54d764c5d8 100644 --- a/server/apps/jpa-app/src/main/java/org/apache/james/JPAJamesServerMain.java +++ b/server/apps/jpa-app/src/main/java/org/apache/james/JPAJamesServerMain.java @@ -49,6 +49,7 @@ import org.apache.james.modules.server.RawPostDequeueDecoratorModule; import org.apache.james.modules.server.ReIndexingModule; import org.apache.james.modules.server.SieveRoutesModule; import org.apache.james.modules.server.TaskManagerModule; +import org.apache.james.modules.server.WebAdminMailOverWebModule; import org.apache.james.modules.server.WebAdminReIndexingTaskSerializationModule; import org.apache.james.modules.server.WebAdminServerModule; @@ -66,7 +67,8 @@ public class JPAJamesServerMain implements JamesServerMain { new MailRepositoriesRoutesModule(), new ReIndexingModule(), new SieveRoutesModule(), - new WebAdminReIndexingTaskSerializationModule()); + new WebAdminReIndexingTaskSerializationModule(), + new WebAdminMailOverWebModule()); private static final Module PROTOCOLS = Modules.combine( new IMAPServerModule(), diff --git a/server/apps/jpa-smtp-app/pom.xml b/server/apps/jpa-smtp-app/pom.xml index df665c36d2..fdad84848d 100644 --- a/server/apps/jpa-smtp-app/pom.xml +++ b/server/apps/jpa-smtp-app/pom.xml @@ -100,6 +100,10 @@ <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-data</artifactId> </dependency> + <dependency> + <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-webadmin-mail-over-web</artifactId> + </dependency> <dependency> <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-mailqueue</artifactId> diff --git a/server/apps/jpa-smtp-app/src/main/java/org/apache/james/JPAJamesServerMain.java b/server/apps/jpa-smtp-app/src/main/java/org/apache/james/JPAJamesServerMain.java index adf064ef82..7c517d2cc8 100644 --- a/server/apps/jpa-smtp-app/src/main/java/org/apache/james/JPAJamesServerMain.java +++ b/server/apps/jpa-smtp-app/src/main/java/org/apache/james/JPAJamesServerMain.java @@ -37,6 +37,7 @@ import org.apache.james.modules.server.MailRepositoriesRoutesModule; import org.apache.james.modules.server.NoJwtModule; import org.apache.james.modules.server.RawPostDequeueDecoratorModule; import org.apache.james.modules.server.TaskManagerModule; +import org.apache.james.modules.server.WebAdminMailOverWebModule; import org.apache.james.modules.server.WebAdminServerModule; import com.google.inject.Module; @@ -53,7 +54,8 @@ public class JPAJamesServerMain implements JamesServerMain { new MailQueueRoutesModule(), new NoJwtModule(), new DefaultProcessorsConfigurationProviderModule(), - new TaskManagerModule()); + new TaskManagerModule(), + new WebAdminMailOverWebModule()); private static final Module JPA_SERVER_MODULE = Modules.combine( new NaiveDelegationStoreModule(), diff --git a/server/apps/memory-app/pom.xml b/server/apps/memory-app/pom.xml index 3096f52cff..578902bf25 100644 --- a/server/apps/memory-app/pom.xml +++ b/server/apps/memory-app/pom.xml @@ -154,6 +154,10 @@ <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-jmap</artifactId> </dependency> + <dependency> + <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-webadmin-mail-over-web</artifactId> + </dependency> <dependency> <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-mailbox</artifactId> diff --git a/server/apps/memory-app/src/main/java/org/apache/james/MemoryJamesServerMain.java b/server/apps/memory-app/src/main/java/org/apache/james/MemoryJamesServerMain.java index 058ad0203d..c7a78d206c 100644 --- a/server/apps/memory-app/src/main/java/org/apache/james/MemoryJamesServerMain.java +++ b/server/apps/memory-app/src/main/java/org/apache/james/MemoryJamesServerMain.java @@ -63,6 +63,7 @@ import org.apache.james.modules.server.SieveRoutesModule; import org.apache.james.modules.server.TaskManagerModule; import org.apache.james.modules.server.UserIdentityModule; import org.apache.james.modules.server.VacationRoutesModule; +import org.apache.james.modules.server.WebAdminMailOverWebModule; import org.apache.james.modules.server.WebAdminServerModule; import org.apache.james.modules.vault.DeletedMessageVaultModule; import org.apache.james.modules.vault.DeletedMessageVaultRoutesModule; @@ -89,7 +90,8 @@ public class MemoryJamesServerMain implements JamesServerMain { new MailQueueRoutesModule(), new MailRepositoriesRoutesModule(), new SieveRoutesModule(), - new UserIdentityModule()); + new UserIdentityModule(), + new WebAdminMailOverWebModule()); public static final JwtConfiguration NO_JWT_CONFIGURATION = new JwtConfiguration(ImmutableList.of()); diff --git a/server/apps/scaling-pulsar-smtp/pom.xml b/server/apps/scaling-pulsar-smtp/pom.xml index 7246697515..22b43d0368 100644 --- a/server/apps/scaling-pulsar-smtp/pom.xml +++ b/server/apps/scaling-pulsar-smtp/pom.xml @@ -108,6 +108,10 @@ <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-data</artifactId> </dependency> + <dependency> + <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-webadmin-mail-over-web</artifactId> + </dependency> <dependency> <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin-mailqueue</artifactId> diff --git a/server/apps/scaling-pulsar-smtp/src/main/java/org/apache/james/Main.java b/server/apps/scaling-pulsar-smtp/src/main/java/org/apache/james/Main.java index dadde4457e..702d8bf0b7 100644 --- a/server/apps/scaling-pulsar-smtp/src/main/java/org/apache/james/Main.java +++ b/server/apps/scaling-pulsar-smtp/src/main/java/org/apache/james/Main.java @@ -45,6 +45,7 @@ import org.apache.james.modules.server.MailetContainerModule; import org.apache.james.modules.server.NoJwtModule; import org.apache.james.modules.server.RawPostDequeueDecoratorModule; import org.apache.james.modules.server.TaskManagerModule; +import org.apache.james.modules.server.WebAdminMailOverWebModule; import org.apache.james.modules.server.WebAdminServerModule; import org.apache.james.queue.pulsar.module.PulsarQueueModule; import org.apache.james.server.blob.deduplication.PassThroughBlobStore; @@ -56,55 +57,49 @@ import com.google.inject.util.Modules; public class Main implements JamesServerMain { public static final Module WEBADMIN = Modules.combine( - new DataRoutesModules(), - new MailQueueRoutesModule(), - new MailRepositoriesRoutesModule(), - new NoJwtModule(), - new WebAdminServerModule() - ); + new DataRoutesModules(), + new MailQueueRoutesModule(), + new MailRepositoriesRoutesModule(), + new NoJwtModule(), + new WebAdminServerModule(), + new WebAdminMailOverWebModule()); public static final Module PROTOCOLS = Modules.combine( - new SMTPServerModule(), - new ProtocolHandlerModule() - ); + new SMTPServerModule(), + new ProtocolHandlerModule()); private static final Module BLOB_MODULE = Modules.combine( - new BlobStoreAPIModule(), - new S3BlobStoreModule(), - new S3BucketModule(), - binder -> { - binder.bind(BlobStoreDAO.class).to(S3BlobStoreDAO.class); - binder.bind(BlobStore.class) - .annotatedWith(Names.named(MetricableBlobStore.BLOB_STORE_IMPLEMENTATION)) - .to(PassThroughBlobStore.class); - } - ); + new BlobStoreAPIModule(), + new S3BlobStoreModule(), + new S3BucketModule(), + binder -> { + binder.bind(BlobStoreDAO.class).to(S3BlobStoreDAO.class); + binder.bind(BlobStore.class) + .annotatedWith(Names.named(MetricableBlobStore.BLOB_STORE_IMPLEMENTATION)) + .to(PassThroughBlobStore.class); + }); public static final Module QUEUE_MODULES = Modules.combine( - new RawPostDequeueDecoratorModule(), - new PulsarQueueModule() - ); + new RawPostDequeueDecoratorModule(), + new PulsarQueueModule()); public static final Module SERVER_CORE_MODULES = Modules.combine( - new DefaultProcessorsConfigurationProviderModule(), - new JPAEntityManagerModule(), - new MailStoreRepositoryModule(), - new MailetContainerModule(), - new BlobstoreMailRepositoryModule(), - binder -> { - binder.bind(MailRepositoryUrlStore.class).to(JPAMailRepositoryUrlStore.class).in(Scopes.SINGLETON); - }, - new CoreDataModule(), - new JPADomainListModule(), - new JPARecipientRewriteTableModule(), - new JPAUsersRepositoryModule(), - new MemoryDelegationStoreModule(), - new TaskManagerModule() - ); + new DefaultProcessorsConfigurationProviderModule(), + new JPAEntityManagerModule(), + new MailStoreRepositoryModule(), + new MailetContainerModule(), + new BlobstoreMailRepositoryModule(), + binder -> binder.bind(MailRepositoryUrlStore.class).to(JPAMailRepositoryUrlStore.class).in(Scopes.SINGLETON), + new CoreDataModule(), + new JPADomainListModule(), + new JPARecipientRewriteTableModule(), + new JPAUsersRepositoryModule(), + new MemoryDelegationStoreModule(), + new TaskManagerModule()); public static void main(String[] args) throws Exception { SMTPRelayConfiguration configuration = SMTPRelayConfiguration.builder() - .useWorkingDirectoryEnvProperty() - .build(); + .useWorkingDirectoryEnvProperty() + .build(); LOGGER.info("Loading configuration {}", configuration.toString()); GuiceJamesServer server = createServer(configuration) @@ -120,6 +115,6 @@ public class Main implements JamesServerMain { public static GuiceJamesServer createServer(SMTPRelayConfiguration configuration) { return GuiceJamesServer.forConfiguration(configuration) - .combineWith(SERVER_CORE_MODULES, BLOB_MODULE, QUEUE_MODULES, PROTOCOLS, WEBADMIN); + .combineWith(SERVER_CORE_MODULES, BLOB_MODULE, QUEUE_MODULES, PROTOCOLS, WEBADMIN); } } --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org