{"record":{"id":"a44860f26a68ca1d","repo":"quarkusio/quarkus","slug":"failed-to-parse-removed-resource-entry-key-e","errorCode":null,"errorMessage":"Failed to parse removed resource '${entry.key}=${entry.resources}'","messagePattern":"Failed to parse removed resource '(.+?)=(.+?)'","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java","lineNumber":443,"sourceCode":"        }\n\n        if (runnerParentFirstArtifacts != null && !runnerParentFirstArtifacts.isEmpty()) {\n            String val = String.join(COMMA, runnerParentFirstArtifacts);\n            props.put(ApplicationModelBuilder.RUNNER_PARENT_FIRST_ARTIFACTS, val);\n        }\n\n        if (excludedArtifacts != null && !excludedArtifacts.isEmpty()) {\n            String val = String.join(COMMA, excludedArtifacts);\n            props.put(ApplicationModelBuilder.EXCLUDED_ARTIFACTS, val);\n        }\n\n        if (!removedResources.isEmpty()) {\n            for (RemovedResources entry : removedResources) {\n                final ArtifactKey key;\n                try {\n                    key = ArtifactKey.fromString(entry.key);\n                } catch (IllegalArgumentException e) {\n                    throw new MojoExecutionException(\n                            \"Failed to parse removed resource '\" + entry.key + '=' + entry.resources + \"'\", e);\n                }\n                if (entry.resources == null || entry.resources.isBlank()) {\n                    continue;\n                }\n                final String[] resources = entry.resources.split(COMMA);\n                if (resources.length == 0) {\n                    continue;\n                }\n                final String value;\n                if (resources.length == 1) {\n                    value = resources[0];\n                } else {\n                    final StringBuilder sb = new StringBuilder();\n                    sb.append(resources[0]);\n                    for (int i = 1; i < resources.length; ++i) {\n                        final String resource = resources[i];\n                        if (!resource.isBlank()) {","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L425-L461","documentation":"In ExtensionDescriptorMojo.recordClassLoadingConfig, each removedResources entry's key is parsed with ArtifactKey.fromString. If the key string is not a valid artifact key (IllegalArgumentException), the mojo throws a MojoExecutionException quoting the offending key=resources pair, aborting descriptor generation.","triggerScenarios":"Configuring the removedResources parameter with a malformed artifact key, e.g. missing colon/group:artifact components or invalid characters — ArtifactKey.fromString rejects it.","commonSituations":"Typo like \"myext\" instead of \"io.quarkus:quarkus-myext\" in removedResources config; using paths or file names instead of artifact keys; copy-pasting config from a different context (artifact coords with type/classifier that ArtifactKey rejects).","solutions":["Fix the key in removedResources config to a valid groupId:artifactId form","Use only the G:A of the artifact whose resources are being removed (no :jar/:type suffixes unless ArtifactKey accepts them)","Check the cause in the stack trace for what ArtifactKey.fromString rejected"],"exampleFix":"<!-- before -->\n<removedResources><key>quarkus-myext</key><resources>...</resources></removedResources>\n<!-- after -->\n<removedResources><key>io.quarkus:quarkus-myext</key><resources>...</resources></removedResources>","handlingStrategy":"validation","validationCode":"// Pre-check removedResources keys parse as ArtifactKeys\nfor (RemovedResources e : removedResources) {\n  try { io.quarkus.maven.dependency.ArtifactKey.fromString(e.key); }\n  catch (IllegalArgumentException ex) { throw new IllegalStateException(\"bad key: \" + e.key, ex); }\n}","typeGuard":null,"tryCatchPattern":"try {\n  invoker.executeMaven(\"extension-descriptor\");\n} catch (MojoExecutionException e) {\n  if (e.getMessage().contains(\"Failed to parse removed resource\")) { fixRemovedResourcesConfig(); }\n  throw e;\n}","preventionTips":["Always use groupId:artifactId form for removedResources keys","Copy key values from the artifact's coordinates, not file paths","Document the expected key format in the pom where removedResources is configured","Validate config in a local run before CI"],"tags":["maven-plugin","configuration","parsing","artifact-key"],"backgroundTag":"invalid-config-value","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"}