Related to https://github.com/spring-projects/spring-boot/issues/34362

I am running on Java 17 configured for the project folder via jenv. Due to the nature of a project, I need to have source/target compatibility set to Java 1.8.

I just get back a non-informative error with no details Could not resolve org.springframework.boot:spring-boot-starter-test:3.0.4.

Can spring boot 3 compile to Java 1.8 or at least Java 11? Or it has to be compiled to Java 17?

Comment From: wilkinsona

Spring Boot 3 requires Java 17. You will not be able to run an application that uses Spring Boot 3 on Java 8 so compiling with a Java 8 target does not make sense.

Comment From: AAverin

I have dependency sources that require to be compiled with 1.8 compatibility, but I don't intend to run Spring Boot on 1.8. Is this something that can be supported or workedaround?

Comment From: wilkinsona

I'm afraid I don't understand why the version of Spring Boot that your application is using has any influence over how that application's dependencies are compiled. FWIW, a Spring Boot 3.0 application can consume dependencies that have been compiled with Java 8 without any problems.

If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.