{"record":{"id":"43cbb84115d3daee","repo":"quarkusio/quarkus","slug":"the-parentnodename-element-description-is-missin","errorCode":null,"errorMessage":"The <parentNodeName> element description is missing child <childName>","messagePattern":"The <parentNodeName> element description is missing child <childName>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java","lineNumber":80,"sourceCode":"            try (InputStream is = Files.newInputStream(pluginXml)) {\n                final Document doc = db.parse(is);\n                final Node pluginNode = getElement(doc.getChildNodes(), \"plugin\");\n                final Plugin plugin = new Plugin();\n                plugin.setGroupId(getChildElementTextValue(pluginNode, \"groupId\"));\n                plugin.setArtifactId(getChildElementTextValue(pluginNode, \"artifactId\"));\n                plugin.setVersion(getChildElementTextValue(pluginNode, \"version\"));\n                return plugin;\n            }\n        } catch (Throwable t) {\n            throw new MojoExecutionException(\"Failed to parse \" + pluginXml, t);\n        }\n    }\n\n    private static String getChildElementTextValue(final Node parentNode, String childName) throws MojoExecutionException {\n        final Node node = getElement(parentNode.getChildNodes(), childName);\n        final String text = getText(node);\n        if (text.isEmpty()) {\n            throw new MojoExecutionException(\n                    \"The \" + parentNode.getNodeName() + \" element description is missing child \" + childName);\n        }\n        return text;\n    }\n\n    private static Node getElement(NodeList nodeList, String name) throws MojoExecutionException {\n        for (int i = 0; i < nodeList.getLength(); ++i) {\n            final Node item = nodeList.item(i);\n            if (item.getNodeType() == Node.ELEMENT_NODE\n                    && (name.equals(item.getNodeName()) || name.equals(item.getLocalName()))) {\n                return item;\n            }\n        }\n        throw new MojoExecutionException(\"Failed to locate element \" + name);\n    }\n\n    private static String getText(Node node) {\n        if (!node.hasChildNodes()) {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java#L62-L98","documentation":"CreateUtils.getChildElementTextValue parses a plugin's XML description (e.g. pom.xml plugin metadata) and requires a named child element to have non-empty text. When the child element exists but its text content is empty, a MojoExecutionException naming both the parent element and missing child is thrown to fail the create/goal fast with a clear message.","triggerScenarios":"Running a Quarkus Maven goal that resolves plugin info via resolvePluginInfo, where the XML under inspection has a child element (looked up by getChildElementTextValue) whose text node is empty or whitespace-only.","commonSituations":"Hand-edited or templated pom.xml/plugin descriptor sections left with empty elements such as <name></name> or <goal></goal>; XML generated by tooling that omits values; typos in the child element name causing an unexpected empty node lookup.","solutions":["Set a non-empty text value for the named child element in the XML document","Verify the child element name matches exactly (case-sensitive) what the tool expects","Check whether an XML processing step (filtering/templating) is stripping the element's text content"],"exampleFix":"// before\n<pluginInfo>\n  <name></name>\n</pluginInfo>\n// after\n<pluginInfo>\n  <name>my-extension</name>\n</pluginInfo>","handlingStrategy":"validation","validationCode":"// Validate XML child elements have text before invoking the goal\nvar nodeList = parentNode.getChildNodes();\nfor (int i = 0; i < nodeList.getLength(); i++) {\n    Node n = nodeList.item(i);\n    if (n.getNodeType() == Node.ELEMENT_NODE\n            && (n.getTextContent() == null || n.getTextContent().isBlank())) {\n        throw new IllegalStateException(\"Element <\" + n.getNodeName()\n                + \"> in <\" + parentNode.getNodeName() + \"> has no text value\");\n    }\n}","typeGuard":"static boolean hasText(Node node) {\n    return node != null && node.getNodeType() == Node.ELEMENT_NODE\n            && node.getTextContent() != null && !node.getTextContent().isBlank();\n}","tryCatchPattern":"try {\n    mojo.execute();\n} catch (MojoExecutionException e) {\n    if (e.getMessage().contains(\"element description is missing child\")) {\n        // fix the XML child element value named in the message and retry\n    }\n}","preventionTips":["Never leave required XML elements empty after editing project descriptors","Validate descriptor XML against a known-good schema or reference project","Beware of Maven resource filtering or templating that can strip element content"],"tags":["maven","xml-parsing","build"],"backgroundTag":"missing-xml-element-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"}