Maven is project management tool.
In java, whenever you want to make a project you need lots of third party libraries such as MySql connector.
If you are not using maven in your project you need to download lots of external jar files and manually configure those into your project also updating that is a tiresome process that’s why we need maven which make developer’s life easier
A maven project basically consist of :-
- POM file
In which we have :-
- Group ID (let say “com.app”), define your package
- Artifact ID (let say “demo”), represent your project name
- Package (com.app.demo.web)
How do you mention in the pom.xml file that I want this dependency in my project? for that you need to add XML code for that dependency
To get the xml code for a particular module:
- just go to MVN Repository
- Search for desired module
- Select the available version, check xml code for that module/ dependency
When you are working with maven you need to have internet connection
If you are using any dependency for the first time.
First, it will check for that dependencies in Local Repo, if not found, it will check download/fetch from Remote Repo
Alternate of Maven is Gradle
Thanks for reading
Top comments (8)
A convenient way to install
mvnis to use
SDKMAN!: then you just have to run the following script :
Thanks for sharing ☺
UR Weclome : good tools make great programmers... and I'm a
mvnfanboy since almost 14 years now <3. It's an amazing and real open source tool. <3
Ah~ that's like a npm, right? A package manager. Is that available in not java?
npm is more or less a package manager only ... Maven is much more ... dependency management, build tool, packaging tool, site generation etc...
Yes, kind of but it's not that huge.
better use search.maven.org/ becase this is a search for central repository.
Thanks for sharing