{"record":{"id":"69a0ddf415bc6fd7","repo":"apache/maven","slug":"could-not-parse-meta-inf-maven-org-apache-maven-ma","errorCode":null,"errorMessage":"Could not parse META-INF/maven/org.apache.maven/maven-core/pom.properties, Maven runtime information not available","messagePattern":"Could not parse META-INF/maven/org\\.apache\\.maven/maven-core/pom\\.properties, Maven runtime information not available","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java","lineNumber":75,"sourceCode":"    public String getMavenVersion() {\n        return mavenVersion;\n    }\n\n    private String loadMavenVersion() {\n        Properties props = new Properties();\n\n        String resource = \"META-INF/maven/org.apache.maven/maven-core/pom.properties\";\n\n        try (InputStream is = DefaultRuntimeInformation.class.getResourceAsStream(\"/\" + resource)) {\n            if (is != null) {\n                props.load(is);\n            } else {\n                logger.warn(\"Could not locate \" + resource + \" on classpath, Maven runtime information not available\");\n            }\n        } catch (IOException e) {\n            String msg = \"Could not parse \" + resource + \", Maven runtime information not available\";\n            if (logger.isDebugEnabled()) {\n                logger.warn(msg, e);\n            } else {\n                logger.warn(msg);\n            }\n        }\n\n        String version = props.getProperty(\"version\", \"\").trim();\n\n        if (!version.startsWith(\"${\")) {\n            return version;\n        } else {\n            return \"\";\n        }\n    }\n\n    @Override\n    public boolean isMavenVersion(String versionRange) {\n        if (Objects.requireNonNull(versionRange, \"versionRange cannot be null\").isEmpty()) {\n            throw new IllegalArgumentException(\"versionRange cannot be empty\");","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java#L57-L93","documentation":"The pom.properties resource of maven-core was found on the classpath, but Properties.load() threw an IOException while parsing it; this warning (with the stack trace, since it is emitted under isDebugEnabled) records the failure and the version falls back to empty. Causes are physical corruption of the file: truncated download, wrong encoding (java.util.Properties requires ISO-8859-1 or UTF-8 with Java 9+ loader rules), or a jar entry that is not a valid key=value stream.","triggerScenarios":"getResourceAsStream returns a non-null stream but props.load(is) raises IOException: a half-written maven-core jar after an interrupted download, a jar repackaged with a broken entry, or tooling that rewrote pom.properties into a format Properties cannot parse.","commonSituations":"Broken artifact cache after a network drop mid-download (local repo jar truncated); docker image layers mangled by an incomplete COPY; CI caches poisoned with corrupted jars; company-wide artifact proxies serving partial content.","solutions":["Run with -X to see the IOException stack trace and the exact parse failure","Purge and re-download the corrupted artifact: delete the maven-core directory in the offending jar's origin (distribution lib/ or local repo) and restore from a clean source","Reinstall the Maven distribution from an official mirror and verify the checksum","In embedding code, treat an empty getMavenVersion() as 'unknown' instead of failing"],"exampleFix":"# before: corrupted jar silently reports no version\nmvn -v   # Maven version line blank / runtime info missing\n\n# after: reinstall distribution and re-download artifacts\nrm -rf ~/.m2/repository/org/apache/maven\ntar xzf apache-maven-3.9.9-bin.tar.gz && apache-maven-3.9.9/bin/mvn -v","handlingStrategy":"fallback","validationCode":"// Robust version handling when pom.properties may be corrupt\nString version = runtimeInformation.getMavenVersion();\nif (version == null || version.isBlank() || version.startsWith(\"${\")) {\n    version = defaultVersion; // injected constant, e.g. the version you built against\n    log.warn(\"Maven runtime information unavailable; assuming {}\", version);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run with -X once on new infrastructure to confirm pom.properties parses cleanly","Reinstall distributions from checksummed archives rather than resuming partial downloads","In tests that embed Maven, ship a known-good pom.properties on the test classpath"],"tags":["maven","runtime-info","corrupted-artifact","properties"],"backgroundTag":"corrupted-properties-file","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}