TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    Apache Maven

    Maven Archetype plugin command line

    Introduction

    Maven archetype plugin allows us to create projects based on predefined structure and template. Let’s see how to work with the Maven archetype plugin command line. Add the bin folder path of your maven installation to the PATH environment variable, so that you can run anywhere in the console the mvn command.

    Create a Project Command line

    To get started with creating a maven project with a template in interactive mode, issue the following command. However, you can suppress the interactive mode and supply the necessary project details with -D command-line options.

    Archetype

    \> mvn archetype:generate

     

    Choose the archetype with a number. Maven would display all available archetypes for you with a number and short description.

    Enter the number to start building the particular project template. The default number will be displayed. in the command line as shown below:

    i.e 1027 maven-archetype-quickstart

    1027: remote -> org.apache.maven.archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)

    Choose the version of the archetype. The number of versions displayed would vary from one archetype to another. The default is the latest version if you choose to skip.

    Project details

    Maven prompts you to enter the project details like groupId, artifactId , version, package , other necessary details etc.

    Project Details

    Once you confirm the project details, Maven will start building the project. Maven would create all the necessary project structure, source, and other files automatically.

    You would see a ‘Build success’ message displayed at the end of the process.

    Build Success Maven

     

    You are done with creating the project with the chosen archetype with Maven.

    Related Posts

    Maven Download Verification Win11

    Apache Maven /

    Download Maven on Windows 11

    Invalid Target Java Error

    Apache Maven /

    Fix Fatal Error compiling: Invalid target release in Maven Project

    Maven Project from archetype

    Apache Maven /

    Create Maven Project from Archetype in NetBeans

    Create New Project

    Apache Maven /

    Create a Maven Project skip archetype

    Maven Download Button

    Apache Maven /

    Install Maven on Ubuntu Linux

    ‹ Maven Archetypes› Install Maven on Ubuntu Linux

    Recent Posts

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com