Create a maven project step by step guide

Understanding Maven

Maven means accumulator of knowledge and the main purpose of maven is to build the java based projects with all sort of information required to build and manage the project. Maven is an efficient build management tool which is based on POM(project object model). It simplifies the project build by making the build dependency uniform, quality project documentation, best practises and transparency for migration. It can be easily integrated to any of the repository management which is available in the market now. Maven came into existence for the purpose of eliminating most of the manual efforts and automate different process involved in the build life cycle.

Creating a Maven project in Intellij

IntelliJ IDE supports integration with maven which will help us to automate the build process. Maven project can be easily created, imported or added to existing one using the Intellij IDE.

  • Click Create New Project on the Welcome screen. Otherwise, select File | New | Project from the main menu.
  • Select Maven from the menu on the left.
  • Specify project’s SDK or use the default one (and an archetype if you want to use a predefined project template).
  • Click Next.
  • On the next page of the wizard, specify the following maven basic parameters that are added to the pom.xml file:
  • GroupId – a package of a new project.
  • ArtifactId – a name of your project.
  • Version – a version of a new project.
  • Click Next.
  • Specify the name and location settings.
  • Click Finish.
  • Project created

Conclusion