{"record":{"id":"0b8eef64bb188abc","repo":"quarkusio/quarkus","slug":"failed-to-located-meta-inf-maven-groupid-artifa-0b8eef","errorCode":null,"errorMessage":"Failed to located META-INF/maven/<groupId>/<artifactId>/pom.properties in ","messagePattern":"Failed to located META-INF/maven/<groupId>/<artifactId>/pom\\.properties in ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java","lineNumber":242,"sourceCode":"    /**\n     * If the model contains properties, this method overrides those that appear to be\n     * defined as system properties.\n     */\n    public static Model applySystemProperties(Model model) {\n        final Properties props = model.getProperties();\n        for (Map.Entry<Object, Object> prop : model.getProperties().entrySet()) {\n            final String systemValue = PropertyUtils.getProperty(prop.getKey().toString());\n            if (systemValue != null) {\n                props.put(prop.getKey(), systemValue);\n            }\n        }\n        return model;\n    }\n\n    private static Properties loadPomProps(Path appJar, Path artifactIdPath) throws IOException {\n        final Path propsPath = artifactIdPath.resolve(\"pom.properties\");\n        if (!Files.exists(propsPath)) {\n            throw new IOException(\"Failed to located META-INF/maven/<groupId>/<artifactId>/pom.properties in \" + appJar);\n        }\n        final Properties props = new Properties();\n        try (BufferedReader reader = Files.newBufferedReader(propsPath)) {\n            props.load(reader);\n        }\n        return props;\n    }\n\n    public static Model readModel(final Path pomXml) throws IOException {\n        Model model = readModel(Files.newInputStream(pomXml));\n        model.setPomFile(pomXml.toFile());\n        return model;\n    }\n\n    public static Model readModel(InputStream stream) throws IOException {\n        try (InputStream is = stream) {\n            return new MavenXpp3Reader().read(is);\n        } catch (XmlPullParserException e) {","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java#L224-L260","documentation":"ModelUtils.loadPomProps reads META-INF/maven/<groupId>/<artifactId>/pom.properties inside an application JAR to extract GAV coordinates. If the pom.properties file is missing it throws IOException. Maven writes this file during packaging unless the build explicitly disables it.","triggerScenarios":"ModelUtils.resolveAppArtifact iterating META-INF/maven/<groupId>/<artifactId>/ directories in a JAR where a group/artifact directory exists but pom.properties was deleted/never written (maven-jar-plugin `addMavenDescriptor=false`, shaded jars, jars repackaged by other tools with race-y directory scanning where the dir exists but the props file was removed between the exists() check and load).","commonSituations":"JARs built with `<addMavenDescriptor>false</addMavenDescriptor>` or maven-shade-plugin filters stripping META-INF/maven; Gradle-built or manually packaged JARs; analyzing thin/relocated jars with the Quarkus bootstrap.","solutions":["Build the JAR with Maven and default settings so pom.properties is embedded; check with `unzip -l app.jar | grep pom.properties`.","Re-enable the descriptor: remove `addMavenDescriptor=false` from maven-jar-plugin config and any shade filters that exclude META-INF/maven.","If coordinates come from elsewhere, resolve them without loadPomProps (e.g. from the repository metadata) rather than from the JAR."],"exampleFix":"<!-- before -->\n<plugin>\n  <artifactId>maven-jar-plugin</artifactId>\n  <configuration>\n    <addMavenDescriptor>false</addMavenDescriptor>\n  </configuration>\n</plugin>\n<!-- after: remove the flag (default true) -->\n<plugin>\n  <artifactId>maven-jar-plugin</artifactId>\n</plugin>","handlingStrategy":"try-catch","validationCode":"static boolean hasPomProperties(Path jar) throws IOException {\n    try (var fs = ZipUtils.newFileSystem(jar)) {\n        Path metaInfMaven = fs.getPath(\"META-INF\", \"maven\");\n        if (!Files.exists(metaInfMaven)) return false;\n        try (var groups = Files.newDirectoryStream(metaInfMaven)) {\n            for (Path g : groups) {\n                try (var arts = Files.newDirectoryStream(g)) {\n                    for (Path a : arts) {\n                        if (Files.exists(a.resolve(\"pom.properties\"))) return true;\n                    }\n                }\n            }\n        }\n    }\n    return false;\n}","typeGuard":null,"tryCatchPattern":"try {\n    ResolvedDependency dep = ModelUtils.resolveAppArtifact(appJar);\n} catch (IOException e) {\n    // pom.properties missing; fall back to 'unknown' coordinates or repo metadata\n}","preventionTips":["Build JARs with Maven default packaging (addMavenDescriptor defaults to true).","Audit shade plugin filters for excludes of META-INF/maven.","Resolve third-party artifact coordinates from repository metadata instead of the JAR."],"tags":["maven","jar","missing-resource","quarkus-bootstrap"],"backgroundTag":"missing-maven-descriptor-in-jar","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}