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 039bdeab526af6d5849fa3ee29688988afda0ad4 Author: Benoit Tellier <[email protected]> AuthorDate: Wed Jul 29 11:39:02 2020 +0700 [REFACTORING] Cleanup Text extractor overrides Mosts are not needed and allows guice wiring simplifications and dependency cleanups --- server/container/cli-integration/pom.xml | 6 ------ server/container/guice/cassandra-guice/pom.xml | 6 ------ .../apache/james/AuthenticatedCassandraJamesServerTest.java | 3 --- .../test/java/org/apache/james/CassandraJamesServerTest.java | 3 --- .../java/org/apache/james/DefaultCassandraJamesServerTest.java | 3 --- server/container/guice/cassandra-rabbitmq-guice/pom.xml | 6 ------ server/container/guice/memory-guice/pom.xml | 6 ------ .../src/test/java/org/apache/james/MemoryJamesServerTest.java | 3 --- .../src/test/java/org/apache/james/MemoryJmapTestRule.java | 6 ------ .../james/jmap/memory/MemoryGetMessageListMethodTest.java | 5 +---- .../RabbitMQLinshareBlobExportMechanismIntegrationTest.java | 3 --- .../webadmin-integration-test-common/pom.xml | 10 ---------- 12 files changed, 1 insertion(+), 59 deletions(-) diff --git a/server/container/cli-integration/pom.xml b/server/container/cli-integration/pom.xml index 8084fda..ccb62bf 100644 --- a/server/container/cli-integration/pom.xml +++ b/server/container/cli-integration/pom.xml @@ -33,12 +33,6 @@ <dependencies> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-scanning-search</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>james-server-cli</artifactId> <scope>test</scope> </dependency> diff --git a/server/container/guice/cassandra-guice/pom.xml b/server/container/guice/cassandra-guice/pom.xml index 01c7a62..7413af1 100644 --- a/server/container/guice/cassandra-guice/pom.xml +++ b/server/container/guice/cassandra-guice/pom.xml @@ -81,12 +81,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-scanning-search</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>james-server-mailbox-plugin-deleted-messages-vault-guice</artifactId> </dependency> <dependency> diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java index 58a6b35..79a8049 100644 --- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java +++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java @@ -24,8 +24,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import org.apache.james.backends.cassandra.DockerCassandra; import org.apache.james.backends.cassandra.init.configuration.ClusterConfiguration; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.PDFTextExtractor; import org.apache.james.modules.TestJMAPServerModule; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @@ -89,7 +87,6 @@ class AuthenticatedCassandraJamesServerTest { .extension(cassandraExtension) .disableAutoStart() .server(configuration -> CassandraJamesServerMain.createServer(configuration) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) .overrideWith(new TestJMAPServerModule()) .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE)) .overrideServerModule(binder -> binder.bind(ClusterConfiguration.class) diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java index 699ca01..d614d17 100644 --- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java +++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java @@ -21,8 +21,6 @@ package org.apache.james; import static org.assertj.core.api.Assertions.assertThat; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.PDFTextExtractor; import org.apache.james.modules.ConfigurationProbe; import org.apache.james.modules.TestJMAPServerModule; import org.junit.jupiter.api.Test; @@ -34,7 +32,6 @@ class CassandraJamesServerTest implements JamesServerContract { .extension(new DockerElasticSearchExtension()) .extension(new CassandraExtension()) .server(configuration -> CassandraJamesServerMain.createServer(configuration) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) .overrideWith(new TestJMAPServerModule()) .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE)) .build(); diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DefaultCassandraJamesServerTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DefaultCassandraJamesServerTest.java index 86b6de5..229654e 100644 --- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DefaultCassandraJamesServerTest.java +++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DefaultCassandraJamesServerTest.java @@ -22,8 +22,6 @@ package org.apache.james; import static org.assertj.core.api.Assertions.assertThat; import org.apache.commons.configuration2.BaseHierarchicalConfiguration; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.PDFTextExtractor; import org.apache.james.modules.TestJMAPServerModule; import org.apache.james.server.core.configuration.ConfigurationProvider; import org.apache.james.utils.FailingPropertiesProvider; @@ -37,7 +35,6 @@ class DefaultCassandraJamesServerTest { .extension(new DockerElasticSearchExtension()) .extension(new CassandraExtension()) .server(configuration -> CassandraJamesServerMain.createServer(configuration) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) .overrideWith(new TestJMAPServerModule()) .overrideWith(binder -> binder.bind(PropertiesProvider.class).to(FailingPropertiesProvider.class)) .overrideWith(binder -> binder.bind(ConfigurationProvider.class).toInstance((s, l) -> new BaseHierarchicalConfiguration()))) diff --git a/server/container/guice/cassandra-rabbitmq-guice/pom.xml b/server/container/guice/cassandra-rabbitmq-guice/pom.xml index c0fefec..a4c6c5f 100644 --- a/server/container/guice/cassandra-rabbitmq-guice/pom.xml +++ b/server/container/guice/cassandra-rabbitmq-guice/pom.xml @@ -75,12 +75,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-scanning-search</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>apache-james-mailbox-tika</artifactId> <type>test-jar</type> <scope>test</scope> diff --git a/server/container/guice/memory-guice/pom.xml b/server/container/guice/memory-guice/pom.xml index ebca896..3acfd83 100644 --- a/server/container/guice/memory-guice/pom.xml +++ b/server/container/guice/memory-guice/pom.xml @@ -51,12 +51,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-scanning-search</artifactId> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>apache-james-mailbox-quota-search-scanning</artifactId> </dependency> <dependency> diff --git a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java index 2da10d6..0dde933 100644 --- a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java +++ b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java @@ -19,8 +19,6 @@ package org.apache.james; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.PDFTextExtractor; import org.apache.james.modules.TestJMAPServerModule; import org.junit.jupiter.api.extension.RegisterExtension; @@ -29,7 +27,6 @@ class MemoryJamesServerTest implements JamesServerContract { static JamesServerExtension jamesServerExtension = new JamesServerBuilder<>(JamesServerBuilder.defaultConfigurationProvider()) .server(configuration -> MemoryJamesServerMain.createServer(configuration) .overrideWith(new TestJMAPServerModule()) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE)) .build(); } diff --git a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapTestRule.java b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapTestRule.java index c1e2697..8e24907 100644 --- a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapTestRule.java +++ b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapTestRule.java @@ -21,10 +21,6 @@ package org.apache.james; import java.io.IOException; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.MessageSearchIndex; -import org.apache.james.mailbox.store.search.PDFTextExtractor; -import org.apache.james.mailbox.store.search.SimpleMessageSearchIndex; import org.apache.james.modules.TestJMAPServerModule; import org.apache.james.server.core.configuration.Configuration; import org.junit.rules.TemporaryFolder; @@ -45,8 +41,6 @@ public class MemoryJmapTestRule implements TestRule { .build(); return MemoryJamesServerMain.createServer(configuration) .overrideWith(new TestJMAPServerModule()) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) - .overrideWith(binder -> binder.bind(MessageSearchIndex.class).to(SimpleMessageSearchIndex.class)) .overrideWith(modules); } diff --git a/server/protocols/jmap-draft-integration-testing/memory-jmap-draft-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java b/server/protocols/jmap-draft-integration-testing/memory-jmap-draft-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java index f675373..fbb3055 100644 --- a/server/protocols/jmap-draft-integration-testing/memory-jmap-draft-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java +++ b/server/protocols/jmap-draft-integration-testing/memory-jmap-draft-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java @@ -27,9 +27,7 @@ import org.apache.james.GuiceJamesServer; import org.apache.james.MemoryJmapTestRule; import org.apache.james.jmap.draft.methods.integration.GetMessageListMethodTest; import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.MessageSearchIndex; import org.apache.james.mailbox.store.search.PDFTextExtractor; -import org.apache.james.mailbox.store.search.SimpleMessageSearchIndex; import org.apache.james.modules.TestJMAPServerModule; import org.junit.Ignore; import org.junit.Rule; @@ -43,8 +41,7 @@ public class MemoryGetMessageListMethodTest extends GetMessageListMethodTest { @Override protected GuiceJamesServer createJmapServer() throws IOException { return memoryJmap.jmapServer(TestJMAPServerModule.SearchModule.maximumMessages(LIMIT_TO_3_MESSAGES), - binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class), - binder -> binder.bind(MessageSearchIndex.class).to(SimpleMessageSearchIndex.class)); + binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)); } @Override diff --git a/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/vault/RabbitMQLinshareBlobExportMechanismIntegrationTest.java b/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/vault/RabbitMQLinshareBlobExportMechanismIntegrationTest.java index 43136e1..bdd5521 100644 --- a/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/vault/RabbitMQLinshareBlobExportMechanismIntegrationTest.java +++ b/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/vault/RabbitMQLinshareBlobExportMechanismIntegrationTest.java @@ -27,8 +27,6 @@ import org.apache.james.JamesServerBuilder; import org.apache.james.JamesServerExtension; import org.apache.james.SearchConfiguration; import org.apache.james.backends.rabbitmq.DockerRabbitMQSingleton; -import org.apache.james.mailbox.extractor.TextExtractor; -import org.apache.james.mailbox.store.search.PDFTextExtractor; import org.apache.james.modules.AwsS3BlobStoreExtension; import org.apache.james.modules.LinshareGuiceExtension; import org.apache.james.modules.RabbitMQExtension; @@ -58,7 +56,6 @@ class RabbitMQLinshareBlobExportMechanismIntegrationTest extends LinshareBlobExp .extension(new AwsS3BlobStoreExtension()) .extension(new LinshareGuiceExtension()) .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration) - .overrideWith(binder -> binder.bind(TextExtractor.class).to(PDFTextExtractor.class)) .overrideWith(new TestJMAPServerModule()) .overrideWith(new TestRabbitMQModule(DockerRabbitMQSingleton.SINGLETON)) .overrideWith(new WebadminIntegrationTestModule()) diff --git a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/pom.xml b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/pom.xml index 43f31ca..36f1dfe 100644 --- a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/pom.xml +++ b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/pom.xml @@ -49,11 +49,6 @@ </dependency> <dependency> <groupId>${james.groupId}</groupId> - <artifactId>apache-james-mailbox-scanning-search</artifactId> - <type>test-jar</type> - </dependency> - <dependency> - <groupId>${james.groupId}</groupId> <artifactId>backup</artifactId> <type>test-jar</type> </dependency> @@ -62,11 +57,6 @@ <artifactId>blob-export-guice</artifactId> <type>test-jar</type> </dependency> - <!--<dependency>--> - <!--<groupId>${james.groupId}</groupId>--> - <!--<artifactId>james-server-cassandra-guice</artifactId>--> - <!--<type>test-jar</type>--> - <!--</dependency>--> <dependency> <groupId>${james.groupId}</groupId> <artifactId>james-server-guice-common</artifactId> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
