class DeprecatedCoreExpressionValidator extends AbstractMavenPluginParametersValidator {
    private static final HashMap<String, String> DEPRECATED_CORE_PARAMETERS;

    private static final String ARTIFACT_REPOSITORY_REASON =
            "ArtifactRepository type is deprecated and its use in Mojos should be avoided.";

    static {
        HashMap<String, String> deprecatedCoreParameters = new HashMap<>();
        deprecatedCoreParameters.put("${localRepository}", ARTIFACT_REPOSITORY_REASON);
        deprecatedCoreParameters.put("${session.localRepository}", ARTIFACT_REPOSITORY_REASON);
        DEPRECATED_CORE_PARAMETERS = deprecatedCoreParameters;
    }

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

    @Override
    protected String getParameterLogReason(Parameter parameter) {
        return "uses deprecated parameter expression '" + parameter.getDefaultValue() + "': "
                + DEPRECATED_CORE_PARAMETERS.get(parameter.getDefaultValue());
    }

    @Override
    protected void doValidate(
            MavenSession mavenSession,
            MojoDescriptor mojoDescriptor,
            Class<?> mojoClass,
            PlexusConfiguration pomConfiguration,
            ExpressionEvaluator expressionEvaluator) {<FILL_FUNCTION_BODY>}

    private boolean isDeprecated(Parameter parameter) {
        return Objects.equals(
                        org.apache.maven.artifact.repository.ArtifactRepository.class.getName(), parameter.getType())
                && DEPRECATED_CORE_PARAMETERS.containsKey(parameter.getDefaultValue());
    }
}

        if (mojoDescriptor.getParameters() == null) {
            return;
        }

        mojoDescriptor.getParameters().stream()
                .filter(this::isDeprecated)
                .map(this::formatParameter)
                .forEach(m -> pluginValidationManager.reportPluginMojoValidationIssue(
                        PluginValidationManager.IssueLocality.EXTERNAL, mavenSession, mojoDescriptor, mojoClass, m));
    
<methods>public final void validate(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.descriptor.MojoDescriptor, Class<?>, org.codehaus.plexus.configuration.PlexusConfiguration, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator) <variables>protected final non-sealed org.apache.maven.plugin.PluginValidationManager pluginValidationManager