如何配置 Tika 的 pom.xml 以停止获取所有许可证依赖警告? [英] How do I configure the pom.xml of Tika to stop getting all the license dependency warnings?

查看:27
本文介绍了如何配置 Tika 的 pom.xml 以停止获取所有许可证依赖警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用 Tika 时,我收到了所有这些警告:

I am getting all these warnings from Tika when I try to use it:

2018 年 2 月 24 日晚上 9:24:35org.apache.tika.config.InitializableProblemHandler$3handleInitializableProblem 警告:未加载 JBIG2ImageReader.jbig2文件将被忽略 参见https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io 用于可选的依赖项.未加载 TIFFImageWriter.tiff 文件不会被处理见https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io 用于可选的依赖项.未加载 J2KImageReader.JPEG2000 文件将不被处理.看https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io 用于可选依赖项.

Feb 24, 2018 9:24:35 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem WARNING: JBIG2ImageReader not loaded. jbig2 files will be ignored See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io for optional dependencies. TIFFImageWriter not loaded. tiff files will not be processed See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io for optional dependencies. J2KImageReader not loaded. JPEG2000 files will not be processed. See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io for optional dependencies.

2018 年 2 月 24 日晚上 9:24:35org.apache.tika.config.InitializableProblemHandler$3handleInitializableProblem 警告:org.xerial 的 sqlite-jdbc 不是加载.请在您的类路径上提供 jar 来解析 sqlite文件.请参阅 tika-parsers/pom.xml 以获取正确版本.

Feb 24, 2018 9:24:35 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem WARNING: org.xerial's sqlite-jdbc is not loaded. Please provide the jar on your classpath to parse sqlite files. See tika-parsers/pom.xml for the correct version.

我尝试添加这个(在 Tika pom.xml 中):

I tried adding this (in Tika pom.xml):

            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>1.57</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcmail-jdk15on</artifactId>
                <version>1.57</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>1.57</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>

            <dependency>
                <groupId>com.levigo.jbig2</groupId>
                <artifactId>levigo-jbig2-imageio</artifactId>
                <version>2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.jai-imageio</groupId>
                <artifactId>jai-imageio-core</artifactId>
                <version>1.3.1</version>
                <scope>test</scope>
            </dependency>    
            <dependency>
                <groupId>com.github.jai-imageio</groupId>
                <artifactId>jai-imageio-jpeg2000</artifactId>
                <version>1.3.0</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                    <groupId>org.xerial</groupId>
                    <artifactId>sqlite-jdbc</artifactId>
                    <version>3.20.1</version>
            </dependency>

但我仍然收到相同的警告.

But I still get the same warnings.

我该如何解决这个问题?

How do I resolve this?

更新 1

我的依赖项被添加到这里:https://github.com/apache/tika/blob/1.17/pom.xml#L164-L170

My dependencies were added here: https://github.com/apache/tika/blob/1.17/pom.xml#L164-L170

我也试过没有设置来测试.它没有做任何事情.

Also I did try without the set to test. It did not do anything.

我添加的依赖项似乎是针对 PDFBox 的 Tika 依赖项.

The dependencies that I added seemed to be for PDFBox a Tika dependency.

推荐答案

我添加了以下依赖项,但没有任何其他警告

I added the following dependencies and I didn't have any other warning

    <dependency>
        <groupId>org.apache.tika</groupId>
        <artifactId>tika-core</artifactId>
        <version>1.18</version>
    </dependency>
    <dependency>
        <groupId>org.apache.tika</groupId>
        <artifactId>tika-parsers</artifactId>
        <version>1.18</version>
    </dependency>
    <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>jbig2-imageio</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>com.github.jai-imageio</groupId>
        <artifactId>jai-imageio-jpeg2000</artifactId>
        <version>1.3.0</version>
    </dependency>

这篇关于如何配置 Tika 的 pom.xml 以停止获取所有许可证依赖警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆