{"record":{"id":"53b0fc70bc09b8ec","repo":"quarkusio/quarkus","slug":"failed-to-parse-removed-resource","errorCode":null,"errorMessage":"Failed to parse removed resource '","messagePattern":"Failed to parse removed resource '","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java","lineNumber":279,"sourceCode":"        }\n\n        if (!quarkusExtensionConfiguration.getRequiredCapabilities().isEmpty()) {\n            final StringBuilder buf = new StringBuilder();\n            final Iterator<Capability> i = quarkusExtensionConfiguration.getRequiredCapabilities().iterator();\n            appendCapability(i.next(), buf);\n            while (i.hasNext()) {\n                appendCapability(i.next(), buf.append(','));\n            }\n            props.setProperty(BootstrapConstants.PROP_REQUIRES_CAPABILITIES, buf.toString());\n        }\n\n        if (!quarkusExtensionConfiguration.getRemoveResources().isEmpty()) {\n            for (RemovedResource removedResource : quarkusExtensionConfiguration.getRemoveResources()) {\n                final ArtifactKey key;\n                try {\n                    key = ArtifactKey.fromString(removedResource.getArtifactName());\n                } catch (IllegalArgumentException e) {\n                    throw new GradleException(\n                            \"Failed to parse removed resource '\" + removedResource.getArtifactName(), e);\n                }\n                if (removedResource.getRemovedResources().isEmpty()) {\n                    continue;\n                }\n                final List<String> resources = removedResource.getRemovedResources();\n                if (resources.size() == 0) {\n                    continue;\n                }\n                final String value;\n                if (resources.size() == 1) {\n                    value = resources.get(0);\n                } else {\n                    final StringBuilder sb = new StringBuilder();\n                    sb.append(resources.get(0));\n                    for (int i = 1; i < resources.size(); ++i) {\n                        final String resource = resources.get(i);\n                        if (!resource.isBlank()) {","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-extension-plugin/src/main/java/io/quarkus/extension/gradle/tasks/ExtensionDescriptorTask.java#L261-L297","documentation":"Thrown by ExtensionDescriptorTask.generateQuarkusExtensionProperties when an entry in quarkus.ext.removeResources (RemovedResource) has an artifactName that cannot be parsed as an ArtifactKey. ArtifactKey.fromString requires a valid G[A][:T] format, so malformed strings abort descriptor generation.","triggerScenarios":"A RemovedResource in the extension plugin configuration block declares getArtifactName() as a string that fails ArtifactKey.fromString — e.g. missing group, empty string, or illegal characters.","commonSituations":"Typo in the quarkus { ext { removeResources { ... } } } block of an extension build.gradle, copying an example with placeholder coordinates, or forgetting the group when only an artifact name is given.","solutions":["Fix the artifactName string to a valid 'group:artifact' (or 'group:artifact:type:classifier') coordinate in build.gradle.","Validate the coordinate locally (e.g. run with the exact string against ArtifactKey.fromString) before the build.","Check that the configuration is not reading the artifact name from an incorrectly populated property (e.g. project name vs full coordinates)."],"exampleFix":"// before\nremoveResources {\n  artifactName = 'my-artifact'\n}\n// after\nremoveResources {\n  artifactName = 'io.quarkus.extension:my-artifact'\n}/","handlingStrategy":"validation","validationCode":"// validate the artifactName before configuring removeResources\ndef name = removedResource.artifactName\nif (!(name ==~ /^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+(:[A-Za-z0-9_.-]+){0,2}$/)) {\n  throw new IllegalArgumentException(\"Invalid artifact coordinate: $name — expected 'group:artifact'\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always specify removeResources entries as full 'group:artifact' coordinates.","Copy coordinates directly from the dependency declaration rather than typing them.","Run the descriptor task locally after editing extension configuration blocks.","Keep a unit check that parses each configured coordinate with ArtifactKey.fromString."],"tags":["gradle","configuration","artifact-key","descriptor"],"backgroundTag":"invalid-artifact-coordinates","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"}