Maven "Non-parseable POM" XML error in CI
Maven could not parse pom.xml as XML. A mismatched tag, stray character, or truncated file makes the model unreadable, and the build fails in the very first phase with the line and column of the syntax error.
What this error means
mvn stops with "Non-parseable POM ...: ... (position: ... line N, column M)", often "must be terminated by the matching end-tag" or "unexpected end of stream".
mvn output
[FATAL] Non-parseable POM /home/runner/work/app/pom.xml:
end tag name </dependencies> must match start tag name <dependency> from line 28
(position: TEXT seen ...</dependencies>... @34:18) @ line 34, column 18 -> [Help 1]Common causes
Mismatched or unclosed XML tags
A <dependency> or <plugin> block is not closed, or an end tag does not match its start tag, so the XML parser aborts.
A stray character or bad merge
A conflict marker, smart quote, or truncated write left the POM malformed.
How to fix it
Fix the XML at the reported line and column
- Open
pom.xmlat the line/column Maven prints. - Close or correct the mismatched tag, or remove the stray character.
- Validate the file as XML before re-running.
Terminal
xmllint --noout pom.xmlCatch malformed POMs in CI early
Run a fast validate step so a broken POM fails before slower goals.
Terminal
mvn -B validateHow to prevent it
- Lint
pom.xmlas XML in a pre-commit hook. - Resolve merge conflict markers before committing.
- Run
mvn validateas the first CI step.
Related guides
Maven "'dependencies.dependency.version' is missing" in CIFix Maven "'dependencies.dependency.version' for X is missing" in CI - a dependency has no version and none i…
Maven duplicate dependency declaration error in CIFix Maven "'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique" in CI - the POM dec…
Maven "Unresolved/invalid version" (property placeholder) in CIFix Maven version placeholders like ${revision} not resolving in CI - the property that defines the version i…