installationmaven, create and runWebProject
- 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. )
- 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