1.

What do you mean by a Maven Archetype? How will you create a new project based on an Archetype?

Answer»

Maven Archetype is a Maven plugin that makes it possible to create a project structure based on a template. These archetypes are essentially project templates that Maven generates when you create a new project. Archetype is a Maven project templating TOOLKIT, in a nutshell.

After getting to the directory where the project is located, type the command: – mvn archetype: GENERATE in the command prompt. This aids in CREATING a new project based on an archetype.

There are four steps for creating a project from an archetype:

  • prepare a repository reference
  • the CHOICE of an archetype,
  • that archetype's configuration,
  • the efficient creation of the project using the data gathered

In most cases, an archetype is procured from a REMOTE repository. You're ready to go if that repository can be reached using your Maven configuration. You must add the repository to your settings.xml if the repository is not managed and you wish to refer to it directly.



Discussion

No Comment Found