This is an automated email from the ASF dual-hosted git repository.

jhelou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit f154ba8c99d0ba5da891fe8932d3cbd97168e6a6
Author: Jean Helou <[email protected]>
AuthorDate: Sat Sep 13 18:03:23 2025 +0200

    [JAMES-4145] removes invalid dependency to postgres-common-guice
    
    postgres-common-guice should not depend on james-server-guice-distributed ( 
since that pulls cassandra, opensearch, rabbitmq,... ) when apps can 
legitimately use the postgres backend without all this.
    
    removing that dependency led to :
    - discovering a couple suspicious modules in postgres-common-guice which 
depend on rabbit and cassandra respectively
    - dicovering missing a missing direct dependency in mailbox postgres
    
    The modules were moved to the app itself for now but 
PostgresDLPConfigurationStoreModule is really suspicious.
---
 server/apps/migration/core-data-jpa-to-pg/pom.xml  |  4 +++
 server/apps/postgres-app/pom.xml                   |  4 +++
 .../data/PostgresDLPConfigurationStoreModule.java  | 37 +++++++++++-----------
 .../modules/task/DistributedTaskManagerModule.java |  0
 server/container/guice/mailbox-postgres/pom.xml    |  7 +++-
 server/container/guice/postgres-common/pom.xml     |  4 ---
 6 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/server/apps/migration/core-data-jpa-to-pg/pom.xml 
b/server/apps/migration/core-data-jpa-to-pg/pom.xml
index fd7051ca7f..a8af750981 100644
--- a/server/apps/migration/core-data-jpa-to-pg/pom.xml
+++ b/server/apps/migration/core-data-jpa-to-pg/pom.xml
@@ -78,6 +78,10 @@
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-guice-distributed</artifactId>
+        </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-sieve-postgres</artifactId>
diff --git a/server/apps/postgres-app/pom.xml b/server/apps/postgres-app/pom.xml
index fd4af524a4..a2d64cce39 100644
--- a/server/apps/postgres-app/pom.xml
+++ b/server/apps/postgres-app/pom.xml
@@ -141,6 +141,10 @@
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-guice-distributed</artifactId>
+        </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-imap</artifactId>
diff --git 
a/server/container/guice/postgres-common/src/main/java/org/apache/james/modules/data/PostgresDLPConfigurationStoreModule.java
 
b/server/apps/postgres-app/src/main/java/org/apache/james/modules/data/PostgresDLPConfigurationStoreModule.java
similarity index 86%
rename from 
server/container/guice/postgres-common/src/main/java/org/apache/james/modules/data/PostgresDLPConfigurationStoreModule.java
rename to 
server/apps/postgres-app/src/main/java/org/apache/james/modules/data/PostgresDLPConfigurationStoreModule.java
index f5a765b41f..4f3dd12f16 100644
--- 
a/server/container/guice/postgres-common/src/main/java/org/apache/james/modules/data/PostgresDLPConfigurationStoreModule.java
+++ 
b/server/apps/postgres-app/src/main/java/org/apache/james/modules/data/PostgresDLPConfigurationStoreModule.java
@@ -1,21 +1,21 @@
-/****************************************************************
- * 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.                                           *
- ****************************************************************/
+/******************************************************************************
+ * 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.                                                         *
+ 
******************************************************************************/
 
 package org.apache.james.modules.data;
 
@@ -31,6 +31,7 @@ import com.google.inject.Scopes;
 import com.google.inject.TypeLiteral;
 import com.google.inject.multibindings.Multibinder;
 
+//FIXME - I don't see what this has to do with postgres when it pulls stuff 
from data-cassandra ...
 public class PostgresDLPConfigurationStoreModule extends AbstractModule {
 
     @Override
diff --git 
a/server/container/guice/postgres-common/src/main/java/org/apache/james/modules/task/DistributedTaskManagerModule.java
 
b/server/apps/postgres-app/src/main/java/org/apache/james/modules/task/DistributedTaskManagerModule.java
similarity index 100%
rename from 
server/container/guice/postgres-common/src/main/java/org/apache/james/modules/task/DistributedTaskManagerModule.java
rename to 
server/apps/postgres-app/src/main/java/org/apache/james/modules/task/DistributedTaskManagerModule.java
diff --git a/server/container/guice/mailbox-postgres/pom.xml 
b/server/container/guice/mailbox-postgres/pom.xml
index 28da17432d..599f8f5231 100644
--- a/server/container/guice/mailbox-postgres/pom.xml
+++ b/server/container/guice/mailbox-postgres/pom.xml
@@ -17,7 +17,8 @@
     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/maven-v4_0_0.xsd";>
+<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/maven-v4_0_0.xsd";>
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -65,6 +66,10 @@
             <groupId>${james.groupId}</groupId>
             <artifactId>james-server-mailbox-adapter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            
<artifactId>james-server-mailbox-plugin-deleted-messages-vault-guice</artifactId>
+        </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
             <artifactId>james-server-postgres-common-guice</artifactId>
diff --git a/server/container/guice/postgres-common/pom.xml 
b/server/container/guice/postgres-common/pom.xml
index c48e8b0591..c279a42662 100644
--- a/server/container/guice/postgres-common/pom.xml
+++ b/server/container/guice/postgres-common/pom.xml
@@ -76,10 +76,6 @@
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-distributed</artifactId>
-        </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
             <artifactId>james-server-mailbox-adapter</artifactId>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to