Skip to main content

Search 400 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, guides, blog and product.

XML format

Maven POM

Maven's project model: coordinates, dependencies, plugins, repositories, and inherited build configuration under one namespaced <project> root.

pom.xml is both a dependency manifest and an inheritable build model. groupId, artifactId, and version form the project's coordinates, while parent and dependencyManagement can supply values not visible in the file itself.

The document declares the POM 4.0.0 namespace even though Maven's model version has remained 4.0.0 for years. Effective configuration is the result of inheritance, interpolation, profiles, and defaults, not a literal reading of one document.

Constraints that bite

  • The root is <project> in the POM 4.0.0 namespace and modelVersion is 4.0.0.
  • Element order follows the Maven model schema; arbitrary reordering can fail validation.
  • A missing groupId or version may be inherited from parent, so absence alone is not an error.
  • Property expressions such as ${project.version} are resolved while building the effective model.
Root element
<project>
Media type
application/xml
Extensions
.xml
Namespaces
  • http://maven.apache.org/POM/4.0.0
XMLDir label
xml

Specification: Apache Maven POM reference

A minimal valid document

Every example on this site is checked against the same parser the workspace uses, so what you see below is known to be well-formed.

maven-pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>catalog</artifactId>
  <version>1.0.0</version>
</project>

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.