(POM) Project Object Model



For Project configuration maven need pom.xml file.
The POM having different tags for project, dependencies, plugin, and etc for making the project.
POM also having the relationship between multiple modules.
Sample Structure of pom.xml file
<project>
    <modelVersion>5.0.0</modelVersion>
    <groupId>org.test</groupId>
    <artifactId>org.test</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>org.test</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>5.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
            //...
            </plugin>
        </plugins>
    </build>
</project>

groupId – A name of group or organization or company who is creating this project.
artifactId – A name of project.
version – Project Version.
Packaging – Method type of project.(WAR/JAR/ZIP)
url - URL of your organization
dependencies - Dependency which will be downloaded by maven from the resp repositories.
To declare the dependency of external library you need to specify the groupId, artifactId and version.

Maven Repositories:
Repository is used to store the dependencies and artifacts. The default loca repository
path in machine is  .m2/repository directory in the home directory of the machine.
If an artifact or dependency is available in the local repositories then that will be used
otherwise dependency or artifact will be downloaded and stored in the local  .m2/repository repository.

If some dependencies or library are not available in the central repository then
you can specify it as given below.

<repositories>
    <repository>
        <id>JBoss repository</id>
        <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    </repository>
</repositories>