The reference documentation recommends using <optional>true</optional> when declaring a dependency on spring-boot-autoconfigure-processor but, following a discussion with @odrotbohm, it's apparent that this doesn't prevent the dependency from being packaged in the fat jar. The same goes for a Lombok dependency when generated by start.spring.io which also uses <optional>true</optional>. The Maven plugin's documentation recommends an exclusion-based approach instead.

We should review the current documentation and Maven plugin behaviour and make the updates that are necessary to make things consistent. We should also verify how things behave with Gradle. I believe it will not have the same problem if the annotationProcessor configuration is used, but we should double-check. Once this has been straightened out, we may need to make some updates to start.spring.io as it currently uses <optional>true</optional> with Lombok.

Comment From: ghost

Hi @wilkinsona, I would like to take this issue, i already found the documentation.

Comment From: snicoll

Closing in favor of PR #22000