Storm record--7--maven installation uses

Source: Internet
Author: User

MAVEN installation uses

Environment Preparation:

    1. JDK1.6

    2. Maven 3.0.4

    3. mveclipse8.6.1 (Integrated Mveclipse)

    4. Before installing MAVEN, you need to make sure that the JDK is installed and that MAVEN is a project under Apache.

    5. Download mavenhttp://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz website

    6. Unzip or rename after download is complete

To configure the MAVEN environment variable:

System variable: maven_home = D:\server\maven

User variable: path =%maven_home%\bin

Open cmd, input: mvn-version

MVN is a MAVEN directive, mvn-version is to view the version information, if you can print out the version information, the computer has been installed successfully.

To modify the location of the MAVEN repository:

Locate the Settings.xml configuration file under maven under Conf, which is under the current user's. M2 under the repository directory

Modified to <localRepository>D:\Repositorys\maven</localRepository>

Input in cmd and enter to execute: MVN help:system

Then maven downloads a whole bunch of things from the remote repository, which will have to be downloaded sooner or later.

Maven Configuration to MyEclipse:

Turn on Myeclipse,window-Preferences--and MyEclipse--maven4myeclipse-up Maven

Installations remove the default, add the maven you just installed

User Settings Set the directory for MAVEN's settings.xml configuration file

Maven Command set:

  1. To create a common Java project for maven:

    MVN archetype:create

    -dgroupid=packagename

    -dartifactid=projectname

  2. To create a MAVEN Web project:

    MVN archetype:create

    -dgroupid=packagename

    -dartifactid=webappname

    -darchetypeartifactid=mvaen-archetype-webapp

  3. Compiling source code: MVN Compile

  4. Compile test code: MVN test-compile

  5. Run Test: MVN test

  6. Generate SITE:MVN Site

  7. Packaging: MVN Package

  8. Installing JAR:MVN install in the local repository

  9. Clear the resulting project: MVN clean

  10. Build Eclipse Project: MVN eclipse:eclipse

  11. Production idea Project: MVN Idea:idea

  12. Combining goal commands, such as package-only not tested: Mvn-dtest packages

  13. Content of the compilation test: MVN test-compile

  14. Only hit jar package: MVN Jar:jar

  15. Test only without compiling, or test compilation: MVN test-skipping compile-skipping Test-compile

  16. Clear some system settings for Eclipse: mvn Eclipse:clean

  17. Source file for download package: MVN dependency:sources

Common commands:

    • MVN Package

    • MVN Eclipse:eclipse

    • MVN Compile

    • MVN Jar:jar

    • MVN clean


Storm record--7--maven installation uses

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.