{"record":{"id":"48c0865536b34d35","repo":"quarkusio/quarkus","slug":"deployment-artifact-artifact-not-found-in-ext-pr","errorCode":null,"errorMessage":"deployment-artifact artifact not found in ${EXT_PROPERTIES_PATH} from ${artifactFile}","messagePattern":"deployment-artifact artifact not found in (.+?) from (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/enforcer-rules/src/main/java/io/quarkus/enforcer/DeploymentDependencyRuleSupport.java","lineNumber":127,"sourceCode":"                throw new UncheckedIOException(\"Failed to read \" + EXT_PROPERTIES_PATH + \" from \" + artifactFile, e);\n            }\n        } else {\n            try (ZipFile zipFile = new ZipFile(artifactFile)) {\n                ZipEntry entry = zipFile.getEntry(EXT_PROPERTIES_PATH);\n                if (entry == null) {\n                    return Optional.empty();\n                }\n                try (InputStreamReader isr = new InputStreamReader(zipFile.getInputStream(entry), StandardCharsets.UTF_8)) {\n                    extProperties.load(isr);\n                }\n            } catch (IOException e) {\n                throw new UncheckedIOException(\"Failed to read \" + EXT_PROPERTIES_PATH + \" from \" + artifactFile, e);\n            }\n        }\n\n        String deploymentGAV = extProperties.getProperty(\"deployment-artifact\");\n        if (deploymentGAV == null) {\n            throw new IllegalStateException(\n                    \"deployment-artifact artifact not found in \" + EXT_PROPERTIES_PATH + \" from \" + artifactFile);\n        }\n        return Optional.of(deploymentGAV);\n    }\n\n    protected boolean isCheckRequired(MavenProject project) {\n        return true;\n    }\n}\n","sourceCodeStart":109,"sourceCodeEnd":137,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/enforcer-rules/src/main/java/io/quarkus/enforcer/DeploymentDependencyRuleSupport.java#L109-L137","documentation":"After successfully loading quarkus-extension.properties, parseDeploymentGAV expects the 'deployment-artifact' key containing the GAV of the matching -deployment artifact. If the properties file lacks that key, it throws IllegalStateException 'deployment-artifact artifact not found in <path> from <artifactFile>'. This indicates the artifact is not a properly generated Quarkus extension runtime jar.","triggerScenarios":"parseDeploymentGAV is called on an artifact whose quarkus-extension.properties exists but has no 'deployment-artifact' entry — e.g. a hand-made or third-party jar with a quarkus-extension.properties from another purpose, or a Quarkus runtime jar built without the extension packaging codegen.","commonSituations":"A non-extension artifact accidentally matching the rule's filter (wrong groupId/artifact pattern in enforcer config); a locally patched Quarkus jar built without the quarkus-extension packaging; classpath polluted by a repackaged/uber jar that dropped the property.","solutions":["Verify the jar is a genuine Quarkus runtime extension built with the quarkus-extension packaging (unzip -p jar quarkus-extension.properties should show deployment-artifact=...)","Exclude the offending non-extension artifact from the rule's scan (adjust its include filters)","Rebuild the extension with the quarkus-extension packaging so the extension-codegen writes the deployment-artifact property","Remove a shadowed/uber jar from the dependency set that replaced the original artifact"],"exampleFix":"// before: rule scans a non-Quarkus jar that carries a stray properties file\n<includes><include>com.example:*</include></includes>\n// after: restrict to real Quarkus runtime artifacts\n<includes><include>io.quarkus:quarkus-*</include></includes>","handlingStrategy":"validation","validationCode":"// Shell: confirm the jar really is a Quarkus runtime extension\nunzip -p quarkus-foo-1.0.jar quarkus-extension.properties | grep '^deployment-artifact=' \\\n  || echo \"not a Quarkus runtime extension jar\"","typeGuard":null,"tryCatchPattern":"try {\n    Optional<String> gav = support.getDeploymentGAV(artifact);\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"deployment-artifact artifact not found\")) {\n        getLog().warn(\"Skipping non-Quarkus artifact: \" + artifact);\n    } else throw e;\n}","preventionTips":["Scope the rule's includes to io.quarkus:quarkus-* runtime artifacts only","Build extensions with the quarkus-extension packaging so deployment-artifact is generated","Do not shade/repackage Quarkus runtime jars — repackaging drops quarkus-extension.properties entries","Audit the dependency set for jars that shadow Quarkus artifacts"],"tags":["maven","enforcer","quarkus-extension","configuration"],"backgroundTag":"missing-manifest-property","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"}