Install MAVEN on Windows, and create a project

Source: Internet
Author: User

1. The browser opens the http://maven.apache.org/address. Click Download

2. Select the ZIP package format to download.
Introducing the MAVEN directory structure

The--bin directory contains scripts to run MAVEN, which we'll configure in the environment variables.
The--boot directory has a jar file, which is the. xml file in the--conf directory that is used to create an internal loader that is required by the MAVEN runtime to define the behavior of some maven. The--lib directory is the MAVEN core jar file.
3. Next configure the MAVEN environment variable to add a variable named: M2_home path to the MAVEN directory in the system variable

(2) Create a M2 variable path in the system variable to point to the Maven bin directory
3. Edit the path system variable, and at the end add the MAVEN environment variable, remember; Semicolon Don't forget


Then open a CMD command window data mvn-version

This means that our MAVEN installation was successful.


Next, use the command to create a MAVEN project

1. Create a new Maven working directory 2. Open in cmd

3. Input commandmvn archetype:generate--MVN is a common command for MAVEN--archetype is a template tool plugin commonly used by Maven--generate is a plug-in target for archetype
then run the first run will be slow, because to download a lot of core plug-ins
after that, you'll run into a selection screen.
Select default the latest version number is 6 Click Enter
Then request data GroupId GroupId is the identity of the organization to which the project belongs
Then request data Artifactid Artifactid is the name of the project that uniquely identifies the project directly
Then the version of the data project has a 1.0 default
The next step is to enter the package name default is the same as GroupID I choose the default
Next you need to confirm the above property configuration and then y to confirm the continuation
See the hint message Build success

Then we can see the basic skeleton structure of MAVEN before we create the MAVEN project catalog.
Project Packaging:
Continue to open a CMD command window pointing to Maven project
Enter MVN Package
Seeing build success means packaging is successful
And then see the Mvnstudy directory more than a target file under target file more than a jar file, and then run the next jar file


Then you can see the successful output of the Helloword


Install MAVEN on Windows, and create a project

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.