无法扫描<多个文件=“”>(系统找不到指定的文件)

时间:2019-03-18 12:52:05

标签: spring maven spring-boot jsp spring-boot-devtools

我从一个Spring Boot 2应用程序开始,该应用程序与Apache Tika一起正常工作。我模仿了here中的依赖关系,以尝试使该应用程序服务于JSP。现在,当我运行该应用程序时,我得到了很长的堆栈跟踪信息,表明了一堆无法扫描/找到的jar文件。实际上,我的Maven存储库不包含指示的JAR文件,但我无法弄清楚如何将它们放入存储库。例如,第一个JAR jaxb-api-2.3.1.jar是tika-parsers的依赖项,但是当我删除tika并强制更新时,似乎没有下载到我的存储库(至少在应用程序期望的位置)。

我的pom:

    <project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>dispatch</groupId>
    <artifactId>dispatch-java</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>dispatch-java</name>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.3.RELEASE</version>
        <relativePath />
    </parent>

    <properties>
        <java.version>1.8</java.version>
        <tika.version>1.20</tika.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Begin Spring Boot dependencies -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Begin Tika dependencies -->
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-parsers</artifactId>
            <version>${tika.version}</version>
        </dependency>
        <!-- End Tika dependencies -->

        <!-- start JSP dependencies -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <!-- Provided -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- end JSP dependencies -->

    </dependencies>

</project>

我的应用程序:

package dispatcher;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DispatcherApplication {

    public static void main(final String[] args) {
        SpringApplication.run(DispatcherApplication.class, args);
    }
}

以及生成的(相当长的)stack trace

如果我启用了一个tika或三个JSP依赖项,但又不是全部同时启用,则该应用程序似乎启动就没有问题。可能是什么问题?

编辑:这个问题似乎并没有影响应用程序的运行,只是在输出中抛出了一堆痕迹(运行Spring Boot DevTools);从JAR运行应用程序不会出现此问题-显然这与Spring Boot DevTools有关吗?

0 个答案:

没有答案