From d27d89748d5c9904f01f38d22a2b1361f32bbd7f Mon Sep 17 00:00:00 2001 From: Stuart Hendren Date: Wed, 19 Jan 2022 13:52:17 +0000 Subject: [PATCH] Exposes the tesseract processors via the module info Was not accessible for use directly. --- annot8-components-tesseract/pom.xml | 6 ++++++ .../java/io/annot8/components/tesseract/processors/OCR.java | 2 +- annot8-components-tesseract/src/main/java/module-info.java | 2 ++ .../io/annot8/components/tesseract/processors/OCRTest.java | 3 +-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/annot8-components-tesseract/pom.xml b/annot8-components-tesseract/pom.xml index 5ab01fd..bd243d4 100644 --- a/annot8-components-tesseract/pom.xml +++ b/annot8-components-tesseract/pom.xml @@ -30,6 +30,12 @@ tess4j 4.5.4 + + + net.java.dev.jna + jna + 5.6.0 + \ No newline at end of file diff --git a/annot8-components-tesseract/src/main/java/io/annot8/components/tesseract/processors/OCR.java b/annot8-components-tesseract/src/main/java/io/annot8/components/tesseract/processors/OCR.java index f3d8c63..88c22f0 100644 --- a/annot8-components-tesseract/src/main/java/io/annot8/components/tesseract/processors/OCR.java +++ b/annot8-components-tesseract/src/main/java/io/annot8/components/tesseract/processors/OCR.java @@ -69,7 +69,7 @@ public static class Processor extends AbstractProcessor { private final ITesseract instance; private final List extensions; - public Processor(List extensions, ITesseract tesseract) { + private Processor(List extensions, ITesseract tesseract) { this.extensions = extensions; this.instance = tesseract; } diff --git a/annot8-components-tesseract/src/main/java/module-info.java b/annot8-components-tesseract/src/main/java/module-info.java index 184348c..616601c 100644 --- a/annot8-components-tesseract/src/main/java/module-info.java +++ b/annot8-components-tesseract/src/main/java/module-info.java @@ -8,4 +8,6 @@ requires java.desktop; requires jakarta.json.bind; requires io.annot8.conventions; + + exports io.annot8.components.tesseract.processors; } diff --git a/annot8-components-tesseract/src/test/java/io/annot8/components/tesseract/processors/OCRTest.java b/annot8-components-tesseract/src/test/java/io/annot8/components/tesseract/processors/OCRTest.java index f6326b1..2afa2ed 100644 --- a/annot8-components-tesseract/src/test/java/io/annot8/components/tesseract/processors/OCRTest.java +++ b/annot8-components-tesseract/src/test/java/io/annot8/components/tesseract/processors/OCRTest.java @@ -14,9 +14,8 @@ public class OCRTest { - // Disabled as it requires tesseract to be installed @Test - @Disabled + @Disabled("Disabled as it requires tesseract to be installed") public void test() throws Exception { OCR desc = new OCR(); Processor ocr = desc.createComponent(null, new OCR.Settings());