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

ndipiazza pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/main by this push:
     new e9c2edbbc Tika grpc mv take3 (#1854)
e9c2edbbc is described below

commit e9c2edbbc6bb5eabe4a33f86bbb1e9cf2275e681
Author: Tim Allison <[email protected]>
AuthorDate: Wed Jul 10 10:25:20 2024 -0400

    Tika grpc mv take3 (#1854)
    
    * TIKA-4181 - grpc server and client
    
    * latest updates - wip
    
    * code formatting
    
    * fix the issues with deps and such
    
    * add bidi streaming
    
    * clean up wording
    
    * make it as a stale connection expiring store
    
    * clean
    
    * delete dead code
    
    * add closeable
    
    * add closeable
    
    * add closeable
    
    * fixed issues related to proto lint
    
    * example docker file
    
    * example docker file and install docker file
    
    * fix the rm
    
    * more info
    
    * --platform linux/arm64
    
    * --platform linux/arm64
    
    * add work around comment for future
    
    * add comment
    
    * fix issues with files in wrong dir
    
    * add quotes
    
    * add a few more cleanups
    
    * add logging
    add reflection api for grpc so you can use grpc curl
    
    * fix issues and add tests for get, delete
    
    * push latest fixes
    
    * add start of a test scenario
    
    * add a fully functional http test case
    
    * add mtls as an option
    
    * add mtls in the example
    
    * add some robustness and add an exec
    
    * Fix issues with the fetch metadata
    
    * TIKA-4252: fix metadata issue
    
    * TIKA-4252: fix issue with config param serialization.
    
    * TIKA-4252: add error path
    
    * TIKA-4252: add protection against null metadata
    
    * TIKA-4252: fix merge conflicts from main
    
    * TIKA-4252: add json schema methods
    
    * TIKA-4252: fix broken tests, useless method
    
    * TIKA-4252: remove stupid sleep from test
    
    * TIKA-4252: fix checkstyle issue
    
    * TIKA-4252: log violations to console
    
    * TIKA-4252: log violations to console
    
    * TIKA-4252: exclude generated sources
    
    * TIKA-4252: if tika config is read-only, use a tmp file for tika server so 
that it can be modified
    
    * TIKA-4252: if tika config is read-only, use a tmp file for tika server so 
that it can be modified
    
    * add a health check
    
    * stop sending "metadata json" instead send a copy of the fetch 
configuration json that can add or override the main fetcher config
    
    * fix merge conflicts
    
    * fix issue with additional headers
    
    * move tika-grpc where it belongs inside the tika-server, not in the pipes 
project.
    
    * make params align with tika server and make them optional
    
    * merge TIKA-4181 and mv tika-grpc to higher level module
    
    * expand bounds in rtf parser test to deal with locally installed tesseract 
and exiftool
    
    ---------
    
    Co-authored-by: Nicholas DiPiazza <[email protected]>
---
 pom.xml                                            |   1 +
 {tika-pipes/tika-grpc => tika-grpc}/README.md      |   0
 {tika-pipes/tika-grpc => tika-grpc}/pom.xml        |  97 ++++++++++++++++++++-
 .../tika/pipes/grpc/ExpiringFetcherStore.java      |   0
 .../org/apache/tika/pipes/grpc/TikaGrpcServer.java |  21 ++++-
 .../apache/tika/pipes/grpc/TikaGrpcServerImpl.java |   7 +-
 .../src/main/proto/tika.proto                      |   0
 .../src/main/resources/log4j2.xml                  |   0
 .../tika/pipes/grpc/ExpiringFetcherStoreTest.java  |   0
 ...PipesBiDirectionalStreamingIntegrationTest.java |   0
 .../apache/tika/pipes/grpc/TikaGrpcServerTest.java |   0
 .../src/test/resources/certs/README.md             |   0
 .../src/test/resources/certs/ca.key                |   0
 .../src/test/resources/certs/ca.pem                |   0
 .../src/test/resources/certs/client.key            |   0
 .../src/test/resources/certs/client.pem            |   0
 .../src/test/resources/certs/server1.key           |   0
 .../src/test/resources/certs/server1.pem           |   0
 .../src/test/resources/log4j2.xml                  |   0
 .../src/test/resources/test-files/014760.docx      | Bin
 .../src/test/resources/test-files/017091.docx      | Bin
 .../src/test/resources/test-files/017097.docx      | Bin
 .../src/test/resources/test-files/018367.docx      | Bin
 .../src/test/resources/tika-pipes-test-config.xml  |   0
 .../tika/parser/microsoft/rtf/RTFParserTest.java   |   4 +-
 tika-pipes/pom.xml                                 |   1 -
 tika-pipes/tika-grpc/example-dockerfile/Dockerfile |  43 ---------
 .../tika-grpc/example-dockerfile/docker-build.sh   |  45 ----------
 .../grpc/exception/FetcherNotFoundException.java   |  23 -----
 29 files changed, 120 insertions(+), 122 deletions(-)

diff --git a/pom.xml b/pom.xml
index dd5706296..42b28477f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,6 +45,7 @@
     <module>tika-batch</module>
     <module>tika-langdetect</module>
     <module>tika-pipes</module>
+    <module>tika-grpc</module>
     <module>tika-app</module>
     <module>tika-server</module>
     <module>tika-integration-tests</module>
diff --git a/tika-pipes/tika-grpc/README.md b/tika-grpc/README.md
similarity index 100%
rename from tika-pipes/tika-grpc/README.md
rename to tika-grpc/README.md
diff --git a/tika-pipes/tika-grpc/pom.xml b/tika-grpc/pom.xml
similarity index 74%
rename from tika-pipes/tika-grpc/pom.xml
rename to tika-grpc/pom.xml
index a401c6033..1749ba167 100644
--- a/tika-pipes/tika-grpc/pom.xml
+++ b/tika-grpc/pom.xml
@@ -29,9 +29,9 @@
 
   <parent>
     <groupId>org.apache.tika</groupId>
-    <artifactId>tika-pipes</artifactId>
+    <artifactId>tika-parent</artifactId>
     <version>3.0.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
+    <relativePath>../tika-parent/pom.xml</relativePath>
   </parent>
 
   <properties>
@@ -353,6 +353,99 @@
           <mainClass>org.apache.tika.pipes.grpc.TikaGrpcServer</mainClass>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>${maven.shade.version}</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <createDependencyReducedPom>
+                false
+              </createDependencyReducedPom>
+              <artifactSet>
+                <excludes>
+                </excludes>
+              </artifactSet>
+              <filters>
+                <filter>
+                  <artifact>*:*</artifact>
+                  <excludes>
+                    <exclude>module-info.class</exclude>
+                    <exclude>META-INF/versions/9/module-info.class</exclude>
+                    <exclude>META-INF/*.SF</exclude>
+                    <exclude>META-INF/*.DSA</exclude>
+                    <exclude>META-INF/*.RSA</exclude>
+                    <exclude>META-INF/*.txt</exclude>
+                    <exclude>META-INF/ASL2.0</exclude>
+                    <exclude>META-INF/DEPENDENCIES</exclude>
+                    <exclude>META-INF/LICENSE</exclude>
+                    <exclude>META-INF/NOTICE</exclude>
+                    <exclude>META-INF/README</exclude>
+                    <exclude>META-INF/MANIFEST.MF</exclude>
+                    <exclude>LICENSE.txt</exclude>
+                    <exclude>NOTICE.txt</exclude>
+                    <exclude>CHANGES</exclude>
+                    <exclude>README</exclude>
+                    <exclude>builddef.lst</exclude>
+                  </excludes>
+                </filter>
+              </filters>
+              <transformers>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                  
<mainClass>org.apache.tika.pipes.grpc.TikaGrpcServer</mainClass>
+                  <manifestEntries>
+                    <Multi-Release>true</Multi-Release>
+                  </manifestEntries>
+                </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                  <resource>META-INF/LICENSE</resource>
+                  <file>target/classes/META-INF/LICENSE</file>
+                </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                  <resource>META-INF/NOTICE</resource>
+                  <file>target/classes/META-INF/NOTICE</file>
+                </transformer>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>${checkstyle.plugin.version}</version>
+        <dependencies>
+          <dependency>
+            <groupId>com.puppycrawl.tools</groupId>
+            <artifactId>checkstyle</artifactId>
+            <version>${puppycrawl.version}</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>validate</id>
+            <phase>validate</phase>
+            <configuration>
+              <configLocation>checkstyle.xml</configLocation>
+              <inputEncoding>UTF-8</inputEncoding>
+              <consoleOutput>true</consoleOutput>
+              <logViolationsToConsole>true</logViolationsToConsole>
+              <includeTestSourceDirectory>true</includeTestSourceDirectory>
+              
<testSourceDirectories>${project.basedir}/src/test/java</testSourceDirectories>
+              <violationSeverity>error</violationSeverity>
+              <failOnViolation>true</failOnViolation>
+              <excludeGeneratedSources>true</excludeGeneratedSources>
+            </configuration>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/ExpiringFetcherStore.java
 b/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/ExpiringFetcherStore.java
similarity index 100%
rename from 
tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/ExpiringFetcherStore.java
rename to 
tika-grpc/src/main/java/org/apache/tika/pipes/grpc/ExpiringFetcherStore.java
diff --git 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServer.java
 b/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServer.java
similarity index 89%
rename from 
tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServer.java
rename to tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServer.java
index 2cd4da941..506522c74 100644
--- 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServer.java
+++ b/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServer.java
@@ -19,6 +19,8 @@ package org.apache.tika.pipes.grpc;
 import static io.grpc.health.v1.HealthCheckResponse.ServingStatus;
 
 import java.io.File;
+import java.io.FileWriter;
+import java.nio.charset.StandardCharsets;
 import java.util.concurrent.TimeUnit;
 
 import com.beust.jcommander.JCommander;
@@ -33,16 +35,20 @@ import io.grpc.protobuf.services.ProtoReflectionService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.tika.config.TikaConfig;
+import org.apache.tika.config.TikaConfigSerializer;
+
 /**
  * Server that manages startup/shutdown of the GRPC Tika server.
  */
 public class TikaGrpcServer {
     private static final Logger LOGGER = 
LoggerFactory.getLogger(TikaGrpcServer.class);
+    public static final int TIKA_SERVER_GRPC_DEFAULT_PORT = 50052;
     private Server server;
-    @Parameter(names = {"-p", "--port"}, description = "The grpc server port", 
help = true, required = true)
-    private Integer port;
+    @Parameter(names = {"-p", "--port"}, description = "The grpc server port", 
help = true)
+    private Integer port = TIKA_SERVER_GRPC_DEFAULT_PORT;
 
-    @Parameter(names = {"-t", "--tika-config"}, description = "The grpc server 
port", help = true, required = true)
+    @Parameter(names = {"-c", "--config"}, description = "The grpc server 
port", help = true)
     private File tikaConfigXml;
 
     @Parameter(names = {"-s", "--secure"}, description = "Enable credentials 
required to access this grpc server")
@@ -82,13 +88,20 @@ public class TikaGrpcServer {
         } else {
             creds = InsecureServerCredentials.create();
         }
+        if (tikaConfigXml == null) {
+            // Create a default tika config
+            tikaConfigXml = File.createTempFile("tika-config", ".xml");
+            try (FileWriter fw = new FileWriter(tikaConfigXml, 
StandardCharsets.UTF_8)) {
+                TikaConfigSerializer.serialize(new TikaConfig(), 
TikaConfigSerializer.Mode.STATIC_FULL, fw, StandardCharsets.UTF_8);
+            }
+        }
         File tikaConfigFile = new File(tikaConfigXml.getAbsolutePath());
         healthStatusManager.setStatus(TikaGrpcServer.class.getSimpleName(), 
ServingStatus.SERVING);
         server = Grpc
                 .newServerBuilderForPort(port, creds)
                 .addService(new 
TikaGrpcServerImpl(tikaConfigFile.getAbsolutePath()))
                 .addService(healthStatusManager.getHealthService())
-                .addService(ProtoReflectionService.newInstance()) // Enable 
reflection
+                .addService(ProtoReflectionService.newInstance())
                 .build()
                 .start();
         LOGGER.info("Server started, listening on " + port);
diff --git 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
 b/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
similarity index 98%
rename from 
tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
rename to 
tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
index 9e58a8299..4eb5f0b01 100644
--- 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
+++ b/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/TikaGrpcServerImpl.java
@@ -66,7 +66,6 @@ import org.apache.tika.SaveFetcherRequest;
 import org.apache.tika.TikaGrpc;
 import org.apache.tika.config.Initializable;
 import org.apache.tika.config.Param;
-import org.apache.tika.config.TikaConfigSerializer;
 import org.apache.tika.exception.TikaConfigException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.parser.ParseContext;
@@ -81,7 +80,7 @@ import org.apache.tika.pipes.fetcher.config.AbstractConfig;
 import org.apache.tika.pipes.fetcher.config.FetcherConfigContainer;
 
 class TikaGrpcServerImpl extends TikaGrpc.TikaImplBase {
-    private static final Logger LOG = 
LoggerFactory.getLogger(TikaConfigSerializer.class);
+    private static final Logger LOG = 
LoggerFactory.getLogger(TikaGrpcServerImpl.class);
     private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
     static {
         OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
@@ -125,6 +124,10 @@ class TikaGrpcServerImpl extends TikaGrpc.TikaImplBase {
                 
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(tikaConfigPath);
 
         Element fetchersElement = (Element) 
tikaConfigDoc.getElementsByTagName("fetchers").item(0);
+        if (fetchersElement == null) {
+            fetchersElement = tikaConfigDoc.createElement("fetchers");
+            tikaConfigDoc.getDocumentElement().appendChild(fetchersElement);
+        }
         for (int i = 0; i < fetchersElement.getChildNodes().getLength(); ++i) {
             
fetchersElement.removeChild(fetchersElement.getChildNodes().item(i));
         }
diff --git a/tika-pipes/tika-grpc/src/main/proto/tika.proto 
b/tika-grpc/src/main/proto/tika.proto
similarity index 100%
rename from tika-pipes/tika-grpc/src/main/proto/tika.proto
rename to tika-grpc/src/main/proto/tika.proto
diff --git a/tika-pipes/tika-grpc/src/main/resources/log4j2.xml 
b/tika-grpc/src/main/resources/log4j2.xml
similarity index 100%
rename from tika-pipes/tika-grpc/src/main/resources/log4j2.xml
rename to tika-grpc/src/main/resources/log4j2.xml
diff --git 
a/tika-pipes/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/ExpiringFetcherStoreTest.java
 
b/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/ExpiringFetcherStoreTest.java
similarity index 100%
rename from 
tika-pipes/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/ExpiringFetcherStoreTest.java
rename to 
tika-grpc/src/test/java/org/apache/tika/pipes/grpc/ExpiringFetcherStoreTest.java
diff --git 
a/tika-pipes/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/PipesBiDirectionalStreamingIntegrationTest.java
 
b/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/PipesBiDirectionalStreamingIntegrationTest.java
similarity index 100%
rename from 
tika-pipes/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/PipesBiDirectionalStreamingIntegrationTest.java
rename to 
tika-grpc/src/test/java/org/apache/tika/pipes/grpc/PipesBiDirectionalStreamingIntegrationTest.java
diff --git 
a/tika-pipes/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/TikaGrpcServerTest.java
 b/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/TikaGrpcServerTest.java
similarity index 100%
rename from 
tika-pipes/tika-grpc/src/test/java/org/apache/tika/pipes/grpc/TikaGrpcServerTest.java
rename to 
tika-grpc/src/test/java/org/apache/tika/pipes/grpc/TikaGrpcServerTest.java
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/README.md 
b/tika-grpc/src/test/resources/certs/README.md
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/README.md
rename to tika-grpc/src/test/resources/certs/README.md
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/ca.key 
b/tika-grpc/src/test/resources/certs/ca.key
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/ca.key
rename to tika-grpc/src/test/resources/certs/ca.key
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/ca.pem 
b/tika-grpc/src/test/resources/certs/ca.pem
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/ca.pem
rename to tika-grpc/src/test/resources/certs/ca.pem
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/client.key 
b/tika-grpc/src/test/resources/certs/client.key
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/client.key
rename to tika-grpc/src/test/resources/certs/client.key
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/client.pem 
b/tika-grpc/src/test/resources/certs/client.pem
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/client.pem
rename to tika-grpc/src/test/resources/certs/client.pem
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/server1.key 
b/tika-grpc/src/test/resources/certs/server1.key
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/server1.key
rename to tika-grpc/src/test/resources/certs/server1.key
diff --git a/tika-pipes/tika-grpc/src/test/resources/certs/server1.pem 
b/tika-grpc/src/test/resources/certs/server1.pem
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/certs/server1.pem
rename to tika-grpc/src/test/resources/certs/server1.pem
diff --git a/tika-pipes/tika-grpc/src/test/resources/log4j2.xml 
b/tika-grpc/src/test/resources/log4j2.xml
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/log4j2.xml
rename to tika-grpc/src/test/resources/log4j2.xml
diff --git a/tika-pipes/tika-grpc/src/test/resources/test-files/014760.docx 
b/tika-grpc/src/test/resources/test-files/014760.docx
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/test-files/014760.docx
rename to tika-grpc/src/test/resources/test-files/014760.docx
diff --git a/tika-pipes/tika-grpc/src/test/resources/test-files/017091.docx 
b/tika-grpc/src/test/resources/test-files/017091.docx
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/test-files/017091.docx
rename to tika-grpc/src/test/resources/test-files/017091.docx
diff --git a/tika-pipes/tika-grpc/src/test/resources/test-files/017097.docx 
b/tika-grpc/src/test/resources/test-files/017097.docx
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/test-files/017097.docx
rename to tika-grpc/src/test/resources/test-files/017097.docx
diff --git a/tika-pipes/tika-grpc/src/test/resources/test-files/018367.docx 
b/tika-grpc/src/test/resources/test-files/018367.docx
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/test-files/018367.docx
rename to tika-grpc/src/test/resources/test-files/018367.docx
diff --git a/tika-pipes/tika-grpc/src/test/resources/tika-pipes-test-config.xml 
b/tika-grpc/src/test/resources/tika-pipes-test-config.xml
similarity index 100%
rename from tika-pipes/tika-grpc/src/test/resources/tika-pipes-test-config.xml
rename to tika-grpc/src/test/resources/tika-pipes-test-config.xml
diff --git 
a/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/microsoft/rtf/RTFParserTest.java
 
b/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/microsoft/rtf/RTFParserTest.java
index 551bd2f75..986bb6b5c 100644
--- 
a/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/microsoft/rtf/RTFParserTest.java
+++ 
b/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/microsoft/rtf/RTFParserTest.java
@@ -135,8 +135,8 @@ public class RTFParserTest extends TikaTest {
 
         //need flexibility for if tesseract is installed or not
         //TODO -- fix this test.  It is too fragile.
-        assertTrue(meta_jpg.names().length >= 52 && meta_jpg.names().length <= 
53);
-        assertTrue(meta_jpg_exif.names().length >= 111 && 
meta_jpg_exif.names().length <= 112);
+        assertTrue(meta_jpg.names().length >= 52 && meta_jpg.names().length <= 
60);
+        assertTrue(meta_jpg_exif.names().length >= 100 && 
meta_jpg_exif.names().length <= 130);
     }
 
     private static class Pair {
diff --git a/tika-pipes/pom.xml b/tika-pipes/pom.xml
index d1de647b3..576493c06 100644
--- a/tika-pipes/pom.xml
+++ b/tika-pipes/pom.xml
@@ -36,7 +36,6 @@
     <module>tika-pipes-iterators</module>
     <module>tika-pipes-reporters</module>
     <module>tika-async-cli</module>
-    <module>tika-grpc</module>
   </modules>
   <dependencies>
     <dependency>
diff --git a/tika-pipes/tika-grpc/example-dockerfile/Dockerfile 
b/tika-pipes/tika-grpc/example-dockerfile/Dockerfile
deleted file mode 100644
index c10b4aa8b..000000000
--- a/tika-pipes/tika-grpc/example-dockerfile/Dockerfile
+++ /dev/null
@@ -1,43 +0,0 @@
-
-# Licensed 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.
-FROM ubuntu:latest
-COPY libs/ /tika/libs/
-COPY tika-config.xml /tika/config/tika-config.xml
-COPY log4j2.xml /tika/config/log4j2.xml
-ARG JRE='openjdk-17-jre-headless'
-RUN set -eux \
-    && apt-get update \
-    && apt-get install --yes --no-install-recommends gnupg2 
software-properties-common \
-    && add-apt-repository -y ppa:alex-p/tesseract-ocr5 \
-    && apt-get update \
-    && DEBIAN_FRONTEND=noninteractive apt-get install --yes 
--no-install-recommends $JRE \
-        gdal-bin \
-        tesseract-ocr \
-        tesseract-ocr-eng \
-        tesseract-ocr-ita \
-        tesseract-ocr-fra \
-        tesseract-ocr-spa \
-        tesseract-ocr-deu \
-    && echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula 
select true | debconf-set-selections \
-    && DEBIAN_FRONTEND=noninteractive apt-get install --yes 
--no-install-recommends \
-        xfonts-utils \
-        fonts-freefont-ttf \
-        fonts-liberation \
-        ttf-mscorefonts-installer \
-        wget \
-        cabextract \
-    && apt-get clean -y \
-    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-EXPOSE 50051
-ENTRYPOINT [ "/bin/sh", "-c", "exec java 
-Dlog4j.configurationFile=/tika/config/log4j2.xml -cp \"/tika/libs/*\" 
org.apache.tika.pipes.grpc.TikaGrpcServer --port 50051 --tika-config 
/tika/config/tika-config.xml"]
diff --git a/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh 
b/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh
deleted file mode 100644
index 3fa51c9d8..000000000
--- a/tika-pipes/tika-grpc/example-dockerfile/docker-build.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-# Licensed 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.
-# TAG_NAME=$1
-
-if [ -z "${TAG_NAME}" ]; then
-    echo "Single command line argument is required which will be used as the 
-t parameter of the docker build command"
-    exit 1
-fi
-
-SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-TIKA_SRC_PATH=${SCRIPT_DIR}/../../..
-OUT_DIR=${TIKA_SRC_PATH}/tika-pipes/tika-grpc/target/tika-docker
-
-mvn clean install -DskipTests=true -f "${TIKA_SRC_PATH}"
-mvn dependency:copy-dependencies -f "${TIKA_SRC_PATH}/tika-pipes/tika-grpc"
-rm -rf "${OUT_DIR}"
-mkdir -p "${OUT_DIR}"
-
-cp -r "${TIKA_SRC_PATH}/tika-pipes/tika-grpc/target/dependency" 
"${OUT_DIR}/libs"
-cp "${TIKA_SRC_PATH}/tika-pipes/tika-grpc/target/tika-grpc-"*".jar" 
"${OUT_DIR}/libs"
-cp "${TIKA_SRC_PATH}/tika-pipes/tika-grpc/src/test/resources/log4j2.xml" 
"${OUT_DIR}"
-cp 
"${TIKA_SRC_PATH}/tika-pipes/tika-grpc/src/test/resources/tika-pipes-test-config.xml"
 "${OUT_DIR}/tika-config.xml"
-cp "${TIKA_SRC_PATH}/tika-pipes/tika-grpc/example-dockerfile/Dockerfile" 
"${OUT_DIR}/Dockerfile"
-
-cd "${OUT_DIR}" || exit
-
-# build single arch
-#docker build "${OUT_DIR}" -t "${TAG_NAME}"
-
-# Or we can build multi-arch - https://www.docker.com/blog/multi-arch-images/
-docker buildx create --name tikabuilder
-# see 
https://askubuntu.com/questions/1339558/cant-build-dockerfile-for-arm64-due-to-libc-bin-segmentation-fault/1398147#1398147
-docker run --rm --privileged tonistiigi/binfmt --install amd64
-docker run --rm --privileged tonistiigi/binfmt --install arm64
-docker buildx build --builder=tikabuilder "${OUT_DIR}" -t "${TAG_NAME}" 
--platform linux/amd64,linux/arm64 --push
-docker buildx stop tikabuilder
diff --git 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/exception/FetcherNotFoundException.java
 
b/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/exception/FetcherNotFoundException.java
deleted file mode 100644
index 72116d6de..000000000
--- 
a/tika-pipes/tika-grpc/src/main/java/org/apache/tika/pipes/grpc/exception/FetcherNotFoundException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.tika.pipes.grpc.exception;
-
-public class FetcherNotFoundException extends Exception {
-    public FetcherNotFoundException(String message) {
-        super(message);
-    }
-}

Reply via email to