apache/maven · warning

Declared at location(s):

Error message

  Declared at location(s):

What it means

Header of the 'Declared at location(s):' section inside the VERBOSE-level plugin validation report. When validationReportLevel == VERBOSE and the plugin recorded where it was declared, the manager lists every POM (file path plus line, captured via InputLocation when a mojo of the plugin ran) that declares the plugin. It exists so you know exactly which POM files to edit to fix or upgrade the offending plugin.

Source

Thrown at impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java:235

        if (hasAnythingToReport(issuesMap, issueLocalitiesToReport)) {
            logger.warn("");
            logger.warn("Plugin {} validation issues were detected in following plugin(s)", issueLocalitiesToReport);
            logger.warn("");

            // Sorting the plugins
            List<Map.Entry<String, PluginValidationIssues>> sortedEntries = new ArrayList<>(issuesMap.entrySet());
            sortedEntries.sort(Map.Entry.comparingByKey(String.CASE_INSENSITIVE_ORDER));

            for (Map.Entry<String, PluginValidationIssues> entry : sortedEntries) {
                PluginValidationIssues issues = entry.getValue();
                if (!hasAnythingToReport(issues, issueLocalitiesToReport)) {
                    continue;
                }
                logger.warn(" * {}", entry.getKey());
                if (validationReportLevel == ValidationReportLevel.VERBOSE) {
                    if (!issues.pluginDeclarations.isEmpty()) {
                        logger.warn("  Declared at location(s):");
                        for (String pluginDeclaration : issues.pluginDeclarations) {
                            logger.warn("   * {}", pluginDeclaration);
                        }
                    }
                    if (!issues.pluginIssues.isEmpty()) {
                        for (IssueLocality issueLocality : issueLocalitiesToReport) {
                            Set<String> pluginIssues = issues.pluginIssues.get(issueLocality);
                            if (pluginIssues != null && !pluginIssues.isEmpty()) {
                                logger.warn("  Plugin {} issue(s):", issueLocality);
                                for (String pluginIssue : pluginIssues) {
                                    logger.warn("   * {}", pluginIssue);
                                }
                            }
                        }
                    }
                    if (!issues.mojoIssues.isEmpty()) {
                        for (IssueLocality issueLocality : issueLocalitiesToReport) {
                            Map<String, LinkedHashSet<String>> mojoIssues = issues.mojoIssues.get(issueLocality);

View on GitHub (pinned to e4093d4e12)

Solutions

  1. Open each listed pom.xml location and update or remove the stale plugin declaration
  2. Centralize the plugin version in the top-level parent's <pluginManagement> and drop per-module <version> tags
  3. If locations point into a remote/parent POM you do not control, override the version in your own pluginManagement
Defensive patterns

Strategy: validation

Validate before calling

# find every declaration of the flagged plugin before the build
find . -name pom.xml -print0 | xargs -0 grep -n -A 3 '<artifactId>maven-compiler-plugin</artifactId>'

Prevention

When it happens

Trigger: Build with -Dmaven.plugin.validation=verbose where a plugin with collected issues has a non-empty pluginDeclarations set (mojo execution populated it via pluginDeclaration(mavenSession, mojoDescriptor)).

Common situations: Large reactors where the flagged plugin is declared in several module POMs or inherited from an intermediate parent; corporate parents referenced via relativePath where the actual declaring file is not obvious.

Related errors


AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21). Data as JSON: /api/errors/161a2da37b328b7b. Report an issue: GitHub.