From 91f454fd6a3279da1d0881464fbb0567e229e495 Mon Sep 17 00:00:00 2001 From: Jesus Maria Mendez Perez Date: Fri, 24 Nov 2023 10:09:55 +0100 Subject: [PATCH 1/2] SAK-49497 Update Tika Parsers and dependencies --- kernel/kernel-impl/pom.xml | 10 +++- .../content/impl/BaseContentService.java | 3 +- master/pom.xml | 46 +++++++++---------- search/search-impl/impl/pom.xml | 12 ++++- 4 files changed, 42 insertions(+), 29 deletions(-) diff --git a/kernel/kernel-impl/pom.xml b/kernel/kernel-impl/pom.xml index c870f1e71c06..cce8c1cc0d15 100644 --- a/kernel/kernel-impl/pom.xml +++ b/kernel/kernel-impl/pom.xml @@ -88,7 +88,15 @@ org.apache.tika - tika-parsers + tika-parsers-standard-package + + + org.apache.tika + tika-parser-scientific-package + + + org.apache.tika + tika-parser-sqlite3-package org.zwobble.mammoth diff --git a/kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java b/kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java index 00687c0949ee..373b153a94cf 100644 --- a/kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java +++ b/kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java @@ -78,6 +78,7 @@ import org.apache.tika.detect.Detector; import org.apache.tika.io.TikaInputStream; import org.apache.tika.metadata.Metadata; +import org.apache.tika.metadata.TikaCoreProperties; import org.apache.tika.mime.MimeTypes; import org.apache.tika.parser.txt.CharsetDetector; import org.apache.tika.parser.txt.CharsetMatch; @@ -5964,7 +5965,7 @@ public void commitResource(ContentResourceEdit edit, int priority) throws OverQu final Metadata metadata = new Metadata(); //This might not want to be set as it would advise the detector - metadata.set(Metadata.RESOURCE_NAME_KEY, edit.getId()); + metadata.set(TikaCoreProperties.RESOURCE_NAME_KEY, edit.getId()); metadata.set(Metadata.CONTENT_TYPE, currentContentType); String newmatch = ""; //If we are ignoring the content for this extension, don't give it any data diff --git a/master/pom.xml b/master/pom.xml index 1cdb9d4b58e7..4ee370d5ba73 100644 --- a/master/pom.xml +++ b/master/pom.xml @@ -72,12 +72,12 @@ 5.5.7 1.5.5 2.0.0.RELEASE - 1.28.5 + 2.9.1 9.0.83 3.0.15.RELEASE 1.6.4 2.20.0 - 1.7.36 + 2.0.9 5.2.4 3.11.2 2.0.9 @@ -1165,30 +1165,26 @@ test - - org.apache.tika - tika-parsers - ${sakai.tika.version} - - - de.l3s.boilerpipe - boilerpipe - - - org.ow2.asm - asm-debug-all - - - commons-logging - commons-logging - - - commons-logging - commons-logging-api - - + org.apache.tika + tika-parsers-standard-package + ${sakai.tika.version} + + + commons-logging + commons-logging + + + + + org.apache.tika + tika-parser-scientific-package + ${sakai.tika.version} + + + org.apache.tika + tika-parser-sqlite3-package + ${sakai.tika.version} org.apache.tika diff --git a/search/search-impl/impl/pom.xml b/search/search-impl/impl/pom.xml index 6ce87ab1c27a..2f0e6fd49bab 100644 --- a/search/search-impl/impl/pom.xml +++ b/search/search-impl/impl/pom.xml @@ -144,8 +144,16 @@ tika-core - org.apache.tika - tika-parsers + org.apache.tika + tika-parsers-standard-package + + + org.apache.tika + tika-parser-scientific-package + + + org.apache.tika + tika-parser-sqlite3-package commons-codec From 88cc90ecdb7003c0c41bb61824dba5198de04bdc Mon Sep 17 00:00:00 2001 From: David Horwitz Date: Fri, 24 Nov 2023 15:24:08 +0200 Subject: [PATCH 2/2] SAK-49497 Update pdfbox 2.0.29 --- search/search-impl/impl/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/search-impl/impl/pom.xml b/search/search-impl/impl/pom.xml index 2f0e6fd49bab..e620036edadd 100644 --- a/search/search-impl/impl/pom.xml +++ b/search/search-impl/impl/pom.xml @@ -120,7 +120,7 @@ org.apache.pdfbox pdfbox - 2.0.26 + 2.0.29 commons-logging