Maven Repository
Maven Repository
Maven is a powerful project management and comprehension tool based on the Project Object
Model (POM). It is widely used in Java development to simplify and streamline the process of
building, managing dependencies, and generating documentation for projects. Maven
significantly enhances the capabilities of traditional build tools like ANT by providing a more
advanced and integrated approach to project management.
1. project - The root element of the `pom.xml` file. It encompasses all other elements and
configurations within the file.
2. modelVersion - Specifies the version of the POM model being used. For projects using
Maven 2 and Maven 3, this is set to "4.0.0".
3. groupId - A unique identifier for the project group, usually resembling the root Java
package name of the project. It helps in organizing and identifying related projects within
a larger ecosystem.
4. artifactId - The name of the project or the artifact that is being built. This is a unique
identifier within the groupId and is typically the same as the project's directory name.
5. version - Indicates the version of the project. This is crucial for managing different releases
of the project, allowing developers to specify and manage versioning easily.
6. dependencies - Defines external libraries and modules that the project depends on. Each
dependency includes its groupId, artifactId, and version, ensuring that Maven can locate
and download the necessary libraries.
7. Build - Contains configurations related to the build process, such as specifying plugins
and their configurations. Plugins are tools that add additional capabilities to the build
process, such as compiling code or packaging the application.
8. Repositories - Specifies remote repositories where Maven can find additional
dependencies that are not available in the central repository. This is useful for integrating
third-party libraries and internal corporate libraries.
9. properties - Defines custom properties that can be used throughout the `pom.xml` file.
This allows for easier management of values that are reused in multiple places within the
file, such as version numbers or directory paths.
Step 6: Done.
4. Clean and rebuild maven project
Step 1: Click on Project menu in eclipse.
Step 2 : Clean > Select Project > Clean.