I have a maven project with modules. The parent for my root project is spring-boot-starter-parent
, which provides a lot of dependency management.
In my module, I use spring-boot-configuration-processor
, which is one of the dependencies managed by spring-boot-starter-parent
(well, actually managed by its parent, spring-boot-dependencies
).
If I don't specify the version in the plugins section, my build fails with:
Resolution of annotationProcessorPath dependencies failed: For artifact {org.springframework.boot:spring-boot-configuration-processor:null:jar}: The version cannot be empty. -> [Help 1]
So, I am forced to have the plugins section look like this:
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>2.6.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
However, I would prefer to reference the inherited version. Although spring-boot-dependencies
has a lot of properties for the versions of various dependencies, it does not have a property for the version of spring-boot-configuration-processor
. Nor does it include spring-boot-configuration-processor
in plugin management.
How do I use the inherited version of this plugin instead of having to explicitly specify the version myself?