in maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java [803:817]
protected MojoAnnotatedClass findClassWithExecuteAnnotationInParentHierarchy(
MojoAnnotatedClass mojoAnnotatedClass, Map<String, MojoAnnotatedClass> mojoAnnotatedClasses) {
if (mojoAnnotatedClass.getExecute() != null) {
return mojoAnnotatedClass;
}
String parentClassName = mojoAnnotatedClass.getParentClassName();
if (parentClassName == null || parentClassName.isEmpty()) {
return null;
}
MojoAnnotatedClass parent = mojoAnnotatedClasses.get(parentClassName);
if (parent == null) {
return null;
}
return findClassWithExecuteAnnotationInParentHierarchy(parent, mojoAnnotatedClasses);
}