02 Building a Java project with Maven

Source: Internet
Author: User
Tags maven central

1. Build a MAVEN project using command-line tools

The first step: Create a Maven workspace directory Mvn_work

The second step: Enter the directory command line by entering the following command:

MVN archetype:generate

Description

Archetype: project template Tool plug-in that uses the plugin to automatically generate the default structure for various projects, looking for all supported project templates from the MAVEN central repository

Generate: Is a goal of the archetype plugin, or a goal of MAVEN, which describes a basic unit of work that will be completed in the build to generate a project template, which also lists all of the project prototype types that MAVEN supports, We can choose from it to create a corresponding project model

The third step: the Central warehouse list of 1486 project prototypes, the default is currently selected a number 703 project model, the default enter, the version has 6, the default is selected as the sixth most recent, enter OK

Fourth step: Identification of the organization to which the GroupID project belongs

Input: Com.company Enter confirmation

Fifth step: Artifactid: The unique identification of the project, the name of the project directly input Mvn_study

Sixth Step: Version number default enter OK

Seventh Step: Package name, the default is the same as GroupID, enter OK

Eighth step: Confirm the Project property information, enter "Y" to determine

At this point, the command line creates the MAVEN project end. Next, package build Mvn_study this project,

DOS Enter Mvn_study project directory, enter MVN package

02 Building a Java project with Maven

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.