Installing the Maven plugin for Eclipse

Source: Internet
Author: User
Tags file copy

Tools/Materials
    • Eclipse (Helios) 3.6

    • Maven 3.0.4

Method/Step
  1. MAVEN3 Installation:

    Before installing Maven, you need to make sure that your JDK is installed and configured. MAVEN is a project under Apache, and the latest version is 3.0.4, and that's what I'm using.

    First go to the official website to download Maven:

    After the download is done, unzip it, rename the extracted folder to Maven, and put it in the D:\Server directory.

  2. To configure the MAVEN environment variable:

    System variable: maven_home = D:\Server\maven

    User variable: Path =%maven_home%\bin, the detailed step is not to say, the property name and attribute values.

    Open cmd, knock inside: mvn-version

    If you can print the following information, the MAVEN3 is already installed on your PC.

  3. To modify the MAVEN repository storage location:

    Locate the Conf under Maven under the Settings.xml configuration file, for example: D:\Server\maven\conf\settings.xml.

    As follows:

  4. The MAVEN repository defaults to the. M2 folder under the local user's temporary folder under Repository, for example, under the C:\Users\admcnm\.m2\repository directory,

    Now let's modify to assign it to our own path, for example now to assign the warehouse to the D:\Repositories\Maven directory, just open the local repository that was logged off, and then write the corresponding path value inside:

  5. There are two of the most common ways that Eclipse installs plug-ins:

    Offline installation, the way to install the link, this way can be better, can be plugged in and unplugged at any time, very convenient.

  6. Link installs Eclipse maven plugin offline

    1. Create two folders in the root directory of your eclipse installation: Links,myplugins (name can be taken casually), my two folders are located in: d:/ide/helios/eclipse/(as a reference, below)

    2. Extract the downloaded eclipse-maven3-plugin.7z from my 115 network disk to the Myplugins directory

    3. In the links directory, create a maven.txt (name can be arbitrarily), open and enter: Path=d:/ide/helios/eclipse/myplugins/maven (please refer to the above corresponding to your MAVEN plugin)

    4. Save the shutdown maven.txt and change the suffix to Maven.link to restart eclipse (if your eclipse is not on, just open it)

  7. Check that the Maven plugin for Eclipse is installed successfully: Window--Preferences

  8. Configure MAVEN: Click the Add button to select the path value of your native installation maven

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

    END
Basic software Information

installation of the original MAVEN and its configuration and use in EclipsePosted 8 months ago (2015-08-18 13:29) Read (836) | Comments (1) 4 People collection This article, I want to collect likes 0

April 23, Wuhan Source Chong meeting Hot registration, look forward to your participation >>>>>

1. Install maven locally  

This is very simple, it is not worthy of the map, only in words to write on the line

(1) on the Apache website download maven2,:http://maven.apache.org/download.html, I downloaded the version is: Maven-2.2.1-bin.zip.

(2) Unzip the maven-2.2.1-bin.zip to D:\Program Files\maven

(3) Configuring environment variables

(3.1) Create a new button in the environment variable, enter m2_home in the variable name, and enter D:\Program Files\maven\apache_maven in the variable value.

(3.2) Then find path, click Edit to add the following statement after the value of the variable:;% M2_home%\bin

(4) To see if the installation was successful, enter the DOS command window and enter: Mvn-v

indicates that the installation was successful

Note: Install MVN, before the package JDK to successfully installed, especially the Java_home variable to be set, if not set java_home variable or the java_home variable is written in another name, such as: Java_home, This installs Maven also will error, said that cannot find the Java home, must use Java_home this name to define the JDK installation path.

2 Modifying the MAVEN repository storage location

Find the installation of MAVEN conf below the Seting.xml file, mine is under E:\develop\maven\apache-maven-2.2.1\conf\

The MAVEN repository defaults to the. M2 folder under the local user's Temp folder under Repository, mine is under the C:\USERS\ZHANGSAN\.M2 directory,

Now let's modify to assign it to our own path, I'm now going to assign the repository to the E:\repository directory, just open the log-off local repository, and change it to the following:

Why to modify the warehouse storage location:

because Maven just installed when we can see that Maven is very small, only the most basic things, but once we use it, we will download everything we need to the warehouse, as we need to invoke more commands, the warehouse will grow larger, so it is best not to put on the C drive, Otherwise, the system is getting slower and later, and the system will be re-installed again next time.

3. Configure Maven in Eclipse

Note that the eclipse we are using is specifically for Java EE Development, not the basic eclipse, but it is important to note that


In some advanced versions there may be a Maven plugin built in, and we don't need to install it,

(1). Specifically, see if there is a maven option in Windowns-preference

If not, you can install the latest M2E plugin from address http://download.eclipse.org/technology/m2e/releases online to eclipse

First Step: Select the Install new software menu item below the Help menu and the following interface appears .

Click OK when you are finished typing. At this point, the corresponding address can be installed on the plug-in list, as shown in

You can then follow the prompts to install. You will need to restart eclipse after the installation is complete.

After the installation is complete, we can see that the menu window->preferences a list of Maven's menu bars after the click-through.

(2) Configure your locally installed Maven into eclipse

We can open the Maven menu bar and find the corresponding installations menu click, in the right window where we can choose the Add button to add our own MAVEN installation directory.

(3) Add the local Maven Setting.xml profile file to eclipse

Click User settings The first is a global setting, all users can access, select the Setting.xml file under the native installation directory

The second is only the user can access, we have just the local installation directory under the Setting.xml file copy to

After the previous selection, Eclipse reads the storage location of the repository inside the Setting.xml configuration file and automatically displays it to the local repository, which is the third red line in the box.

Then click OK to complete the configuration of the Eclipse Maven plugin to use Maven in eclipse.

Installing the Maven plugin for Eclipse

Related Article

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.