apache/maven · error · IllegalStateException

Error loading properties from ${propertiesFile}

Error message

Error loading properties from ${propertiesFile}

What it means

Error "Error loading properties from ${propertiesFile}" thrown in apache/maven.

Source

Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:420

        } else if (systemProperties.getProperty("maven.conf") != null) {
            mavenConf = context.installationDirectory.resolve(systemProperties.getProperty("maven.conf"));
        } else if (systemProperties.getProperty(Constants.MAVEN_HOME) != null) {
            mavenConf = context.installationDirectory
                    .resolve(systemProperties.getProperty(Constants.MAVEN_HOME))
                    .resolve("conf");
        } else {
            mavenConf = context.installationDirectory.resolve("");
        }

        UnaryOperator<String> callback = or(
                context.extraInterpolationSource()::get,
                context.systemPropertiesOverrides::get,
                systemProperties::getProperty);
        Path propertiesFile = mavenConf.resolve("maven-system.properties");
        try {
            MavenPropertiesLoader.loadProperties(systemProperties, propertiesFile, callback, false);
        } catch (IOException e) {
            throw new IllegalStateException("Error loading properties from " + propertiesFile, e);
        }

        Map<String, String> result = toMap(systemProperties);
        result.putAll(context.systemPropertiesOverrides);
        return result;
    }

    protected Map<String, String> populateUserProperties(LocalContext context) {
        Properties userProperties = new Properties();
        Map<String, String> paths = context.extraInterpolationSource();

        // ----------------------------------------------------------------------
        // Options that are set on the command line become system properties
        // and therefore are set in the session properties. System properties
        // are most dominant.
        // ----------------------------------------------------------------------

        Map<String, String> userSpecifiedProperties = context.options != null

View on GitHub (pinned to e4093d4e12)

When it happens

Trigger: Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:420 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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