Categories
gradle java maven spring spring-boot

What is the spring-boot-configuration-processor ? Why do people exclude libraries from it? Why is it invisible in dependency tree?

Introduction

So I noticed the following line in the gradle file of the jhipster project:

annotationProcessor ("org.springframework.boot:spring-boot-configuration-processor") {
exclude group: 'com.vaadin.external.google', module: 'android-json'
}

https://github.com/jhipster/jhipster-sample-app-gradle/blob/9e9c3db8f3bedba4b1efd85ecb6ff3f12a5f596a/build.gradle#L230

We also used the same configuration in Maven for another project to solve the following problem: Maven transient dependency (library/jar vaadin json) is not being excluded

Questions

And now I have the following questions:

  • What does the spring-boot-configuration-processor dependency do?
  • Why is it necessary to sometimes exclude dependencies from the processor?
  • Why doesn’t the processor necessarily appear in the mvn-dependency tree?
  • Why are exclusions used with processor in situations where it’s very difficult to exclude a dependency?