class Maven3CompatDependenciesValidator extends AbstractMavenPluginDependenciesValidator {

    @Inject
    Maven3CompatDependenciesValidator(PluginValidationManager pluginValidationManager) {
        super(pluginValidationManager);
    }

    @Override
    protected void doValidate(
            RepositorySystemSession session,
            Artifact pluginArtifact,
            ArtifactDescriptorResult artifactDescriptorResult) {<FILL_FUNCTION_BODY>}
}

        for (org.eclipse.aether.graph.Dependency dependency : artifactDescriptorResult.getDependencies()) {
            if ("org.apache.maven".equals(dependency.getArtifact().getGroupId())
                    && "maven-compat".equals(dependency.getArtifact().getArtifactId())
                    && !DependencyScope.TEST.is(dependency.getScope())) {
                pluginValidationManager.reportPluginValidationIssue(
                        PluginValidationManager.IssueLocality.EXTERNAL,
                        session,
                        pluginArtifact,
                        "Plugin depends on the deprecated Maven 2.x compatibility layer, which will be not supported in Maven 4.x");
            }
        }
    
<methods>public void validate(RepositorySystemSession, Artifact, ArtifactDescriptorResult) <variables>protected final non-sealed org.apache.maven.plugin.PluginValidationManager pluginValidationManager