Search code examples
javaeclipsemaven

Maven: Project build error 'modelVersion' is missing


I'm trying to create a new Maven project but I get this error from the pom.xml...

Can anybody help me solving the problem, please? I'm a completely newbie with Maven & Eclipse IDE

Thank you so much.

Error details


Solution

  • your pom.xml is incomplete

    you need

    <?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 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>your.group.id</groupId>
        <artifactId>your-artifact-id</artifactId>
        <version>your-version</version>
    
    <!-- all stuff here -->
    
    </project>