Getting started with Maven and getting started with the basics I hope to help you maven tutorial

Source: Internet
Author: User

installationmaven, create and runWebProject
    1. Install maven and integrate maven in Eclipse



1 download maven



Baidu Cloud Disk Address: Http://pan.baidu.com/s/1i32gn9F

Need to be setting.xml

Configured as a private address for your personal use

Download and unzip to local




2 Configuring environment Variables







Path add mavenbin directory below



3 test whether the configuration was successful


At this point, themaven installation is configured successfully.


Note: This document defaults to your eclipse - supported maven project, where the maveneclipse plugin exists

(eclipse no maven plug-in m2eclipse , Refer to the article:

http://www.cnblogs.com/zhaoyang/archive/2012/01/07/2315443.html , maven installation and Configuration methods. )

    1. Eclipse maven project Management in the

1 , you need to add our locally installed maven to Eclipse before using maven in Eclipse , click Add


Select the maven Click apply-that you just added when you are finished adding "ok "


2 , taking the json-server project in SVN as an example

Checkproject svn: http://220.248.36.138:8290/svn/umsbsp/code/src/6.0/

After checkout, right-click the project ->runas→build ...-

Now we can use the maven command.

In general, we can use the: mvnclean install command to perform a clean package installation

Attached command:

Mvnclean purge projects that have been built

Mvninstall to install the project to a local

Mvnpackage Package a project

Mvncompile compiling source code

mvntest run testcase

Mvntest-compile compiling the test code

Mvn-dtest Package package only does not test

mvntest-skipping compile-skipping test-compile only tests without compiling, and does not test compilation
(-skipping can also be used for other combinations of commands )
MVN Eclipse:clean Clear some system settings for Eclipse

...

Please refer to the official documentation for more commands.



This case executes the mvnclean install command


















Open pom.xml file


All dependent jar packages are downloaded and placed in your local repository


Pom.xml The dependency in the file is the jar Package Dependency in our project

If you need a jar pom.xml , you can only add dependency manually

Check the Central warehouse.

http://search.maven.org/

Click on the version number you need to get the dependency you want.






Copy <dependency>...</dependency> paste into the pom.xml in our project and we can use it in the project.


More detailed tutorials on maven:http://pan.baidu.com/s/1bnofsi7

About maven 's Combat books: http://pan.baidu.com/s/1ntGRkH7




theend, thanks!

Getting started with Maven and getting started with the basics I hope to help you maven tutorial

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.