quarkusio/quarkus · error · MojoExecutionException

The <parentNodeName> element description is missing child <c

Error message

The <parentNodeName> element description is missing child <childName>

What it means

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.

Source

Thrown at devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java:80

            try (InputStream is = Files.newInputStream(pluginXml)) {
                final Document doc = db.parse(is);
                final Node pluginNode = getElement(doc.getChildNodes(), "plugin");
                final Plugin plugin = new Plugin();
                plugin.setGroupId(getChildElementTextValue(pluginNode, "groupId"));
                plugin.setArtifactId(getChildElementTextValue(pluginNode, "artifactId"));
                plugin.setVersion(getChildElementTextValue(pluginNode, "version"));
                return plugin;
            }
        } catch (Throwable t) {
            throw new MojoExecutionException("Failed to parse " + pluginXml, t);
        }
    }

    private static String getChildElementTextValue(final Node parentNode, String childName) throws MojoExecutionException {
        final Node node = getElement(parentNode.getChildNodes(), childName);
        final String text = getText(node);
        if (text.isEmpty()) {
            throw new MojoExecutionException(
                    "The " + parentNode.getNodeName() + " element description is missing child " + childName);
        }
        return text;
    }

    private static Node getElement(NodeList nodeList, String name) throws MojoExecutionException {
        for (int i = 0; i < nodeList.getLength(); ++i) {
            final Node item = nodeList.item(i);
            if (item.getNodeType() == Node.ELEMENT_NODE
                    && (name.equals(item.getNodeName()) || name.equals(item.getLocalName()))) {
                return item;
            }
        }
        throw new MojoExecutionException("Failed to locate element " + name);
    }

    private static String getText(Node node) {
        if (!node.hasChildNodes()) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set a non-empty text value for the named child element in the XML document
  2. Verify the child element name matches exactly (case-sensitive) what the tool expects
  3. Check whether an XML processing step (filtering/templating) is stripping the element's text content

Example fix

// before
<pluginInfo>
  <name></name>
</pluginInfo>
// after
<pluginInfo>
  <name>my-extension</name>
</pluginInfo>
Defensive patterns

Strategy: validation

Validate before calling

// Validate XML child elements have text before invoking the goal
var nodeList = parentNode.getChildNodes();
for (int i = 0; i < nodeList.getLength(); i++) {
    Node n = nodeList.item(i);
    if (n.getNodeType() == Node.ELEMENT_NODE
            && (n.getTextContent() == null || n.getTextContent().isBlank())) {
        throw new IllegalStateException("Element <" + n.getNodeName()
                + "> in <" + parentNode.getNodeName() + "> has no text value");
    }
}

Type guard

static boolean hasText(Node node) {
    return node != null && node.getNodeType() == Node.ELEMENT_NODE
            && node.getTextContent() != null && !node.getTextContent().isBlank();
}

Try / catch

try {
    mojo.execute();
} catch (MojoExecutionException e) {
    if (e.getMessage().contains("element description is missing child")) {
        // fix the XML child element value named in the message and retry
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/43cbb84115d3daee. Report an issue: GitHub.