Using plugin id 'org.springframework.boot' version '2.4.4'

Using the following code:

bootJar {
    classpath += project(":web").packageWeb.outputs

breaks bootJar tasks dependencies, resulting in jar containing only dependency libs, but not current project code (missing BOOT-INF/classes/). The classes task is not called.

The following works fine tho:

bootJar {
    classpath project(":web").packageWeb.outputs

Comment From: wilkinsona

Thanks for the report.

Unfortunately, it’s impossible to tell exactly what’s happening here as your description of the problem leaves too many unknowns:

  • Whether :web is a separate project
  • The type of the packageWeb task and how is it configured
  • The version of Gradle that you are using
  • The command that you're using to run the build

If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.