in src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java [1646:1659]
private String getAnnotationProcessorPathVersion(DependencyCoordinate annotationProcessorPath)
throws MojoExecutionException {
String configuredVersion = annotationProcessorPath.getVersion();
if (configuredVersion != null) {
return configuredVersion;
} else {
List<Dependency> managedDependencies = getProjectManagedDependencies();
return findManagedVersion(annotationProcessorPath, managedDependencies)
.orElseThrow(() -> new MojoExecutionException(String.format(
"Cannot find version for annotation processor path '%s'. The version needs to be either"
+ " provided directly in the plugin configuration or via dependency management.",
annotationProcessorPath)));
}
}