What is Maven

Bharath Thippireddy
A free video tutorial from Bharath Thippireddy
IT Architect and Best Selling Instructor- 400000+ students
4.5 instructor rating • 31 courses • 412,920 students

Learn more from the full course

Maven Crash Course

Create a multi module maven java web applicaiton project in easy steps

04:57:34 of on-demand video • Updated April 2021

  • Learn what Maven is and Why it is so popular
  • Master all the core concepts of Maven
  • Create and Build a project from the command line
  • Work on a end to end java web application usecase
  • Create and build maven projects from eclipse
  • Write,Execute and skip unit tests using Maven
  • Create a maven web application
  • Develop a multi module maven project
  • All in simple and easy steps
English What is maven the developers call it a build automation tool but it is much more than that it is a project management tool. Building a project means compiling the source code running the tests which could be unit tests as well as integration tests packaging the compiled code into jar files bundling these jar files into a web archive or a war file deploying these wars on to the servers and several other tasks all these tasks can be automated using tools such as maven and etc if you have worked with tools like ant apache ant then you know that we have to come up with a lot of XML configuration to perform these tasks or to automate these tasks for our application whereas maven uses convention over configuration that is if we follow a certain project structure when we create our projects such as here is the base project directory under it source main Java source folder has a child folder called main under it we have Java this is where all our source code should go source main SRC main resources is where any resources such as property files or XML configuration that we use in our Java classes should go SRC test Java is where all our unit and integration tests should be placed and finally SRC test resources is where all the property files or XML configuration that we use on our tests should be placed once we use this folder structure we can simply execute a maven command such as maven install and maven will compile the source code under the SRC main Java run the unit tests under SRC test Java and if the tests pass it will bundle or package the compiled classes into a jar file if it is a standalone java application if it is a web application it will bundle it into a war file and it can also deploy the war file onto a web application. This folder structure will be slightly different for a standalone Java project for a web application and for different types of projects but the beauty is that we need not create these folders manually for each type of project maven provides several archetypes think about these archetypes as templates we can execute a command with an archetype and it will create the folder structure the standard folder structure required by maven for us there are different types of archetypes like standalone, webapp, EAR etc another additional advantage is that all the popular ides such as Eclipse IntelliJ come with inbuilt support for these archetypes we can create the project's the different types of maven projects from within an IDE and also run and execute our build from within eclipse from within intelliJ.