quarkusio/quarkus · error · BootstrapMavenException

Failed to initialize Maven repository settings

Error message

Failed to initialize Maven repository settings

What it means

BootstrapMavenException thrown while building effective Maven settings (getEffectiveSettings): settings.xml (user or global) could not be initialized — typically unreadable, malformed XML, or containing ERROR/FATAL-level problems reported by the Maven settings builder. This is a generic wrapper around the underlying settings-building failure.

Source

Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java:373

        try {
            final SettingsBuildingResult result = new DefaultSettingsBuilderFactory()
                    .newInstance().build(settingsRequest);
            final List<SettingsProblem> problems = result.getProblems();
            if (!problems.isEmpty()) {
                for (SettingsProblem problem : problems) {
                    switch (problem.getSeverity()) {
                        case ERROR:
                        case FATAL:
                            throw new BootstrapMavenException("Settings problem encountered at " + problem.getLocation(),
                                    problem.getException());
                        default:
                            log.warn("Settings problem encountered at " + problem.getLocation(), problem.getException());
                    }
                }
            }
            effectiveSettings = result.getEffectiveSettings();
        } catch (SettingsBuildingException e) {
            throw new BootstrapMavenException("Failed to initialize Maven repository settings", e);
        }
        return settings = effectiveSettings;
    }

    public String getLocalRepo() throws BootstrapMavenException {
        return localRepo == null ? localRepo = resolveLocalRepo(getEffectiveSettings()) : localRepo;
    }

    private String[] getLocalRepoTail() {
        return localRepoTail == null ? localRepoTail = resolveLocalRepoTail() : localRepoTail;
    }

    private boolean getLocalRepoTailIgnoreAvailability() {
        return localRepoTailIgnoreAvailability == null
                ? localRepoTailIgnoreAvailability = resolveLocalRepoTailIgnoreAvailability()
                : localRepoTailIgnoreAvailability;
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Check ~/.m2/settings.xml and the global settings file for XML syntax errors
  2. Look at the caused-by exception for the exact settings problem location
  3. Fix or remove the offending <server>, <mirror>, <profile> or repository entry reported by the settings builder
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java:373 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/0cb14da981023308. Report an issue: GitHub.