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
commit c2ea9c8a8fa783442cedf95ef45be8c7d788b850 Author: Matthieu Baechler <matth...@apache.org> AuthorDate: Fri May 10 17:31:14 2019 +0200 JAMES-2726 create two new modules for sieve to avoid importing jpa in memory product --- server/container/guice/guice-common/pom.xml | 8 +++--- .../modules/server/MailStoreRepositoryModule.java | 4 +-- server/container/guice/jpa-common-guice/pom.xml | 4 +++ server/container/guice/jpa-guice/pom.xml | 4 +++ server/container/guice/memory-guice/pom.xml | 4 +++ .../src/test/resources/mailetcontainer.xml | 10 +++---- .../src/test/resources/mailrepositorystore.xml | 7 ++--- server/container/guice/pom.xml | 14 +++++++++- .../guice/{jpa-common-guice => sieve-file}/pom.xml | 31 +++++++++------------- .../modules/data/SieveFileRepositoryModule.java | 0 .../guice/{jpa-common-guice => sieve-jpa}/pom.xml | 29 ++++++++------------ .../modules/data/SieveJPARepositoryModules.java | 0 12 files changed, 61 insertions(+), 54 deletions(-) diff --git a/server/container/guice/guice-common/pom.xml b/server/container/guice/guice-common/pom.xml index 8b8a84c..fce6040 100644 --- a/server/container/guice/guice-common/pom.xml +++ b/server/container/guice/guice-common/pom.xml @@ -42,10 +42,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>james-server-data-file</artifactId> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>james-server-data-memory</artifactId> </dependency> <dependency> @@ -94,6 +90,10 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> + <artifactId>james-server-mailrepository-memory</artifactId> + </dependency> + <dependency> + <groupId>${james.groupId}</groupId> <artifactId>james-server-onami</artifactId> </dependency> <dependency> diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java index caa635e..909b3d8 100644 --- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java +++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java @@ -27,8 +27,8 @@ import org.apache.commons.configuration2.tree.ImmutableNode; import org.apache.james.lifecycle.api.Startable; import org.apache.james.mailrepository.api.MailRepositoryProvider; import org.apache.james.mailrepository.api.MailRepositoryStore; -import org.apache.james.mailrepository.file.FileMailRepositoryProvider; import org.apache.james.mailrepository.memory.MailRepositoryStoreConfiguration; +import org.apache.james.mailrepository.memory.MemoryMailRepositoryProvider; import org.apache.james.mailrepository.memory.MemoryMailRepositoryStore; import org.apache.james.server.core.configuration.ConfigurationProvider; import org.apache.james.utils.GuiceProbe; @@ -56,7 +56,7 @@ public class MailStoreRepositoryModule extends AbstractModule { bind(MailRepositoryStore.class).to(MemoryMailRepositoryStore.class); Multibinder<MailRepositoryProvider> multibinder = Multibinder.newSetBinder(binder(), MailRepositoryProvider.class); - multibinder.addBinding().to(FileMailRepositoryProvider.class); + multibinder.addBinding().to(MemoryMailRepositoryProvider.class); Multibinder.newSetBinder(binder(), InitialisationOperation.class).addBinding().to(MailRepositoryStoreModuleInitialisationOperation.class); Multibinder.newSetBinder(binder(), GuiceProbe.class).addBinding().to(MailRepositoryProbeImpl.class); } diff --git a/server/container/guice/jpa-common-guice/pom.xml b/server/container/guice/jpa-common-guice/pom.xml index 2c7b92b..b3c0b29 100644 --- a/server/container/guice/jpa-common-guice/pom.xml +++ b/server/container/guice/jpa-common-guice/pom.xml @@ -40,6 +40,10 @@ <dependencies> <dependency> <groupId>${james.groupId}</groupId> + <artifactId>james-server-data-file</artifactId> + </dependency> + <dependency> + <groupId>${james.groupId}</groupId> <artifactId>james-server-data-jpa</artifactId> </dependency> <dependency> diff --git a/server/container/guice/jpa-guice/pom.xml b/server/container/guice/jpa-guice/pom.xml index 84d47f7..59cd67d 100644 --- a/server/container/guice/jpa-guice/pom.xml +++ b/server/container/guice/jpa-guice/pom.xml @@ -113,6 +113,10 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-sieve-jpa</artifactId> + </dependency> + <dependency> + <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-webadmin</artifactId> </dependency> <dependency> diff --git a/server/container/guice/memory-guice/pom.xml b/server/container/guice/memory-guice/pom.xml index 431e2e6..c81a673 100644 --- a/server/container/guice/memory-guice/pom.xml +++ b/server/container/guice/memory-guice/pom.xml @@ -132,6 +132,10 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-sieve-file</artifactId> + </dependency> + <dependency> + <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-smtp</artifactId> </dependency> <dependency> diff --git a/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml b/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml index e82f960..7f3d345 100644 --- a/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml +++ b/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml @@ -41,7 +41,7 @@ <processor state="error" enableJmx="false"> <mailet match="All" class="Bounce"/> <mailet match="All" class="ToRepository"> - <repositoryPath>file://var/mail/error/</repositoryPath> + <repositoryPath>memory://var/mail/error/</repositoryPath> </mailet> </processor> @@ -99,7 +99,7 @@ <processor state="spam" enableJmx="false"> <mailet match="All" class="ToRepository"> - <repositoryPath>file://var/mail/spam/</repositoryPath> + <repositoryPath>memory://var/mail/spam/</repositoryPath> </mailet> </processor> @@ -108,7 +108,7 @@ <attachment>none</attachment> </mailet> <mailet match="All" class="ToRepository"> - <repositoryPath>file://var/mail/address-error/</repositoryPath> + <repositoryPath>memory://var/mail/address-error/</repositoryPath> </mailet> </processor> @@ -117,7 +117,7 @@ <attachment>none</attachment> </mailet> <mailet match="All" class="ToRepository"> - <repositoryPath>file://var/mail/relay-denied/</repositoryPath> + <repositoryPath>memory://var/mail/relay-denied/</repositoryPath> <notice>Warning: You are sending an e-mail to a remote server. You must be authentified to perform such an operation</notice> </mailet> </processor> @@ -130,7 +130,7 @@ <processor state="rrt-error" enableJmx="false"> <mailet match="All" class="ToRepository"> - <repositoryPath>file://var/mail/rrt-error/</repositoryPath> + <repositoryPath>memory://var/mail/rrt-error/</repositoryPath> <passThrough>true</passThrough> </mailet> <mailet match="IsSenderInRRTLoop" class="Null"/> diff --git a/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml b/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml index 3ca4a1d..a607d6c 100644 --- a/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml +++ b/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml @@ -20,12 +20,9 @@ --> <mailrepositorystore> - <mailrepositories> - <mailrepository class="org.apache.james.mailrepository.file.FileMailRepository"> + <mailrepository class="org.apache.james.mailrepository.memory.MemoryMailRepository"> <protocols> - <protocol>file</protocol> + <protocol>memory</protocol> </protocols> - <config FIFO="false" CACHEKEYS="true"/> </mailrepository> - </mailrepositories> </mailrepositorystore> diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml index 8d5b40b..0ac4ab6 100644 --- a/server/container/guice/pom.xml +++ b/server/container/guice/pom.xml @@ -33,6 +33,7 @@ <name>Apache James :: Server :: Guice</name> <modules> + <module>activemq</module> <module>blob-api-guice</module> <module>blob-export-guice</module> <module>blob-memory-guice</module> @@ -72,9 +73,10 @@ <module>protocols/webadmin-mailqueue</module> <module>protocols/webadmin-mailrepository</module> <module>protocols/webadmin-swagger</module> - <module>activemq</module> <module>rabbitmq</module> <module>testing</module> + <module>sieve-file</module> + <module>sieve-jpa</module> </modules> <dependencyManagement> @@ -159,6 +161,16 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-sieve-file</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${james.groupId}</groupId> + <artifactId>james-server-guice-sieve-jpa</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-smtp</artifactId> <version>${project.version}</version> </dependency> diff --git a/server/container/guice/jpa-common-guice/pom.xml b/server/container/guice/sieve-file/pom.xml similarity index 64% copy from server/container/guice/jpa-common-guice/pom.xml copy to server/container/guice/sieve-file/pom.xml index 2c7b92b..69dbc5a 100644 --- a/server/container/guice/jpa-common-guice/pom.xml +++ b/server/container/guice/sieve-file/pom.xml @@ -17,44 +17,37 @@ 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/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> + <version>3.4.0-SNAPSHOT</version> </parent> - <artifactId>james-server-jpa-common-guice</artifactId> + <artifactId>james-server-guice-sieve-file</artifactId> <packaging>jar</packaging> - <name>Apache James :: Server :: JPA - guice common</name> - - <properties> - <jpa.includes>empty</jpa.includes> - </properties> + <name>Apache James :: Server :: Guice :: Sieve :: File </name> + <description>Sieve File modules for Guice implementation of James server</description> <dependencies> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>james-server-data-jpa</artifactId> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> - <artifactId>james-server-guice-common</artifactId> + <artifactId>james-server-data-file</artifactId> </dependency> <dependency> - <groupId>${james.groupId}</groupId> - <artifactId>testing-base</artifactId> - <scope>test</scope> + <groupId>com.google.inject</groupId> + <artifactId>guice</artifactId> </dependency> <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> </dependencies> + + </project> diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java b/server/container/guice/sieve-file/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java similarity index 100% rename from server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java rename to server/container/guice/sieve-file/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java diff --git a/server/container/guice/jpa-common-guice/pom.xml b/server/container/guice/sieve-jpa/pom.xml similarity index 66% copy from server/container/guice/jpa-common-guice/pom.xml copy to server/container/guice/sieve-jpa/pom.xml index 2c7b92b..11643af 100644 --- a/server/container/guice/jpa-common-guice/pom.xml +++ b/server/container/guice/sieve-jpa/pom.xml @@ -17,25 +17,21 @@ 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/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> + <version>3.4.0-SNAPSHOT</version> </parent> - <artifactId>james-server-jpa-common-guice</artifactId> + <artifactId>james-server-guice-sieve-jpa</artifactId> <packaging>jar</packaging> - <name>Apache James :: Server :: JPA - guice common</name> - - <properties> - <jpa.includes>empty</jpa.includes> - </properties> + <name>Apache James :: Server :: Guice :: Sieve :: JPA </name> + <description>Sieve JPA modules for Guice implementation of James server</description> <dependencies> <dependency> @@ -43,18 +39,15 @@ <artifactId>james-server-data-jpa</artifactId> </dependency> <dependency> - <groupId>${james.groupId}</groupId> - <artifactId>james-server-guice-common</artifactId> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> - <artifactId>testing-base</artifactId> - <scope>test</scope> + <groupId>com.google.inject</groupId> + <artifactId>guice</artifactId> </dependency> <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> </dependencies> + + </project> diff --git a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/SieveJPARepositoryModules.java b/server/container/guice/sieve-jpa/src/main/java/org/apache/james/modules/data/SieveJPARepositoryModules.java similarity index 100% rename from server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/SieveJPARepositoryModules.java rename to server/container/guice/sieve-jpa/src/main/java/org/apache/james/modules/data/SieveJPARepositoryModules.java --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org