0

I have a Spring Boot application. It has the following dependencies:

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <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>
    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-jasper</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-webflux</artifactId>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>org.projectreactor</groupId>
        <artifactId>reactor-spring</artifactId>
        <version>1.0.1.RELEASE</version>
    </dependency>
</dependencies>

To process HTML pages, Spring Boot uses Thymeleaf by default. However, I do not like the verbosity of Thymeleaf, which is probably needed to make both the input and output format be HTML, which I do not need at all.

So I chose to use Spring Boot with JSP, as described here. It worked very well until I wanted one of the Spring Boot/JSP applications to use a local repository from its parent. It caused failed to scan: [cannot find some strange non-existing jar from the parent local repository in question].

As it turns out, without the dependency on tomcat-embed-jasper, the failed to scan errors are gone, the parent local repository is used correctly and the application runs fine, with the exception of .jsp pages which are no more processes as expected. A browser gets them in their raw form. It is expected because tomcat-embed-jasper processes .jsp files.

So I have two excluding choices which prevent the failed to scan error:

  • do not use the parent's local repo because the mere inclusion of Jasper somehow makes it impossible;
  • do not use Spring Boot/JSP but instead SpringBoot/Thymeleaf, so that I do not need to include Jasper.

Is there a method of having both the repo in question and SpringBoot/JSP?

scriptfoo
  • 343
  • 3
  • 11

1 Answers1

0

There is indeed some issue connected with Jar scanning. I do not understand the details, but anyway, the scan can be limited with JSP/JSTL still possible: see this answer.

scriptfoo
  • 343
  • 3
  • 11