Maven and Maven plugin installation

Source: Internet
Author: User

Maven and Maven plugin installation

Benefits of using maven :

    1. I feel the most important is automatic download Jar Packages and the packages it relies on to ensure that multiple people develop Jar different versions of the issue.
    2. Then the file structure is clear, Java files, resource files, and test files are all clearly divided.
One, MAVEN installation 1.Maven installation    A, download and install

Go to the Maven website's download page:http://maven.apache.org/download.cgi, as shown in:

  

Download the current apache-maven-3.2.3-bin.zipand unzip it. I unzipped it to D:\Program files\.

  

  B,MAven Warehouse location
    1. Find The settings.xml configuration file under maven under Conf, my D:\Program files\maven\conf\settings.xml.
    2. The MAVEN repository defaults to the local user's temporary folder under the. M2 folder under the Repository, now assign the warehouse to D:\Repositories\Maven, only need to open the local repository log off above, and then write the corresponding path value inside the Come on:
    3. So maven local repository is D:\Repositories\Maven
   C. Configure Environment Variables

System variable:maven_home = D:\Program Files\maven

User variable:path =%maven_home%\bin. Open cmd, knocking inside: mvn-version If you can print the information above, it means that Maven3 has been installed on your PC.

  

MVN is a maven instruction,mvn-version is to view the version information, my operating system is 32-bit WIN7, the installation of MAVEN is 3.2.3. If you can print the information as above, the Maven3 is already installed.

OK, first to experience maven, in cmd execution: mvn help:system

That's when Maven downloads a bunch of stuff from the remote repository, it's OK, let it download, and sooner or later it's going to be downloaded. The next step is to install the Maven plugin in Eclipse,

  2.Maven plugin installation

Install the Maven plugin in Eclipse, Introduction to three methods, recommended: Offline installation in link mode.

   A, online installation

  Via Help-->install New Software--add, enter the address http://m2eclipse.sonatype.org/sites/m2e, tick the option, and wait for it to download and install, Restart eclipse when you're done.

  

  B, offline installation

First download:http://115.com/file/dpk80gj0#eclipse-maven3-plugin.7z use two ways to install eclipse-maven3-plugin.7z ,

  One,link Way

  1.     in your   eclipse  Create two folders under the root of the installation: links< Span style= "font-family: the song Body;" >, myplugins (name customizable), and myplugins folder
  2.     links  Create a (name customizable) file, open and enter: path=myplugins ( "\ \" &NBSP;&NBSP; "\"  ).
  3. Restart Eclipse , after starting you open Window---> Preferences will find one more option Maven , indicating that the installation was successful. (recommended)

  Second, direct way

Import the unpacked subfolders features and plugins jar package files into the Eclipse installation directory separately. in the features and plugins folders. (more wild)

   3. Configure Maven    A. Associate Local Maven

Window-->preferences-->maven-->installations Click the Add button to select the path value of your native installation Maven -->apply

   B. Set up the local warehouse

User Settingsà Click the Browse button, select your Maven setting.xml profile, then click OK to complete the configuration of the Eclipse Maven plugin

So maven and the Maven plugin in Eclipse are installed,

If you feel the problem with Maven installation in Eclipse, you can use the STS (Spring Tool Suite) or Idea (IntelliJ).

Original creator :twosnail

Maven and Maven plugin installation

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.