Remember the days, you finished your code and you have all your build files in order and your app finally works the way you want it ? and then you share it with your friend/colleague and your whole app has collapsed because somewhere somehow something has gone missing..
That’s where maven could help out. Maven could manage all your dependencies in a pom.xml file and once you share it, they just have to run that file and install using maven and your app looks complete and back to life.
That’s not the only thing that maven could do, there’s a lot more. Just like “npm” you could easily find maven dependencies for most of the modules you are looking for, it even can bum your JDK from 1.6 to a newer version just by changing the pom.xml (Project Object Model) file and running it. Below is an example of how it looks.
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>com.first.app</groupId>
<artifactId>first-maven-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>first-maven-app</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Maven can handle a lot more. But this is what i use the most for.
Below link explains a lot more on maven, it’s a great article, have a look. https://adityasridhar.com/posts/how-to-get-started-with-maven
