It is a build automation tool with which we can import all libraries and can also create project structures. In Maven we have many in-built templates. These templates are called archetypes. A Maven is basically a tool used to compile applications. It helps to develop and managing project structure or applications like deployment, clean, packaging, jar and many more features for the Java-based project.
It is a collection of dependencies of the Java Project which one can specify to Maven and then Maven will download all of them from the internet and then store it to some repository i.e. local repository, central repository, and remote repository.
● Maven helps to setup project very quickly and it avoids complicated build files. So it has POM.xml which have all the dependencies and easy to use.
● Maven did not bundle all the jars in the package i.e. in the War or Ear files as all of them are going to store in the repository. So the bundle deployment will be very light weight.
Maven creates following:
● Directory Name
● Project home
● Contains the POM.xml and all subdirectories.
● Contains the deliverable Java source code for the project.
● Contain the deliverable resources for the project.
● Contains the testing Java source code.
● Contains resources necessary for testing.
Archetypes are the templates to create variety of Java project structures, including web applications specific to a container such as Wildfly.
Following four goals are associated with archetype plugin:
● Create - creates using a quick-start template.
● Generate - provide a menu of templates.
● Create - from-project - creates an archetype from an existing project.
● Crawl - searches the repository for archetype and updates catalog.
Following are the different project types: