You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2023/09/29 18:43:25 UTC

[tika] 01/01: TIKA-4150 - shade commons-io in tika-app

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

tallison pushed a commit to branch TIKA-4150
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 11af85c1a4997e8c59112cc36ee7f0aee5166063
Author: tallison <ta...@apache.org>
AuthorDate: Fri Sep 29 14:43:16 2023 -0400

    TIKA-4150 - shade commons-io in tika-app
---
 CHANGES.txt      |  2 ++
 tika-app/pom.xml | 12 +++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 9d6a3b3ad..a9cb27fbb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 Release 2.9.1 - ??
 
+   * Shaded commons-io in tika-app for compatibility with Hadoop (TIKA-4150).
+
    * Fix bug in DateUtils that stripped timezone information from
      incoming Calendar objects (TIKA-4126).
 
diff --git a/tika-app/pom.xml b/tika-app/pom.xml
index 205f07af5..767b359d8 100644
--- a/tika-app/pom.xml
+++ b/tika-app/pom.xml
@@ -116,6 +116,14 @@
               <goal>shade</goal>
             </goals>
             <configuration>
+              <!-- we have to do this to avoid potential conflicts with, e.g. hadoop, and others
+                who are using old versions of commons-io -->
+              <relocations>
+                <relocation>
+                  <pattern>org.apache.commons.io.</pattern>
+                  <shadedPattern>shaded.org.apache.commons.io.</shadedPattern>
+                </relocation>
+              </relocations>
               <createDependencyReducedPom>
                 false
               </createDependencyReducedPom>
@@ -145,7 +153,8 @@
                     <exclude>ucar/unidata/geoloc/vertical/OceanSG*.class</exclude>
                     <!-- https://issues.apache.org/jira/browse/TIKA-3650-->
                     <exclude>javax/**/*</exclude>
-
+                    <!-- no idea why this is packaged as a jar within a jar -->
+                    <exclude>rome-utils-2.1.0.jar</exclude>
                   </excludes>
                 </filter>
               </filters>
@@ -176,6 +185,7 @@
             </configuration>
           </execution>
         </executions>
+
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>