Installing the MAVEN plugin summary in eclipse

Source: Internet
Author: User

Recently the company needs a new project, want to use MAVEN+SPRINGMVC+SPRING+MYBATIS+MYSQL implementation, before our projects are traditional old projects, not used Maven,eclipse version is Galileo, a little old, No self-bring maven, can only install the plug-in, OK, start working:

  You first need to install the local MAVEN library:

Before installing Maven, you need to make sure that your JDK is installed and configured. Maven is a project under Apache, first go to the official website to download maven:http://www.apache.org/dyn/closer.cgi/maven/binaries/ apache-maven-3.0.4-bin.tar.gz, after the download is done, unzip it, I rename the extracted folder to Maven, and put it in the D:\ directory, that is, MAVEN's final path is: D:\maven

  To configure the MAVEN environment variable:

Add System variable: maven_home = D:\Server\maven
System variable path inside add:%maven_home%\bin;
I believe that we all have to match the environment variables, the detailed steps will not say, to the attribute name and attribute values to match the OK.
Open cmd, knock inside: mvn-version

MVN is an instruction for Mavn, mvn-version is to view the version information, my operating system is 32-bit WIN7, the installation of MAVEN is 3.0.4, if you can print the information as above, it means that Maven has been installed on your computer to complete.

  To modify the MAVEN repository storage location:

Find the Settings.xml configuration file under Maven under Conf, mine is in D:\maven\conf\settings.xml,maven's warehouse by default is placed in the local user's temporary folder (usually in the C drive) under the. M2 folder repos Itory, now let's modify to assign it to our own path, I'm now going to assign the repository to the D:\Repositories\Maven directory, just open the local repository that was logged off, and then write the corresponding path value inside:

OK, first to experience maven, knock in CMD and enter to execute: MVN help:system This is when Maven downloads a whole bunch of stuff from the remote repository, it's okay, it's downloaded, it's going to be downloaded sooner or later, and then the MAVEN plugin is installed in eclipse.

Install the Maven plugin in eclipse:

1. Open Eclipse, Menu "Help"-"Install New software ..."
2. In the work with Address field, enter: Http://download.eclipse.org/releases/juno (note: Juno is the version name of Eclipse, Our company's Galileo version of Eclipse does not have a MAVEN plugin, which is shown in the Juno version first.
3. Enter Maven in the Filter box to locate the plug-in you want to install.
4. Select "Collaboration"-"M2e-maven Integration for Eclipse" and click the Next button to install the steps.
5. Install to restart Eclipse, menu: Window-to-preferences, enter MAVEN for related settings.

It is easy to fail when installing plugins:

The following is a solution in a blog post:

However, this is likely to be a problem cannot complete the install because one or more required items could isn't be found. The reason for this is that there is a lack of additional jar packages on which the MAVEN plug-in is installed, and the solution is given on STACKOVERFOLW:
Help, Install New software
Enter Http://www.fuin.org/p2-repository/,Name in the Location column to name it yourself (e.g. slf4j)
Expand "Maven osgi-bundles" Check "Slf4j-api"
Then reinstall the M2eclipse plugin as recommended by the official website
I follow the above thinking, my version of Eclipse is Juno, and did not work, the installation of M2eclipse will still encounter problems, there are said other versions do not encounter problems. So I went to Eclipse's website and tried to look at the other versions, and I was amazed to find that Luna and Mars versions of Eclipse EE came with maven support! So the best solution is to upgrade eclipse. So what exactly should be done? Upgrade in the same version of Eclipse, you can help->check for updates, but what if you want to upgrade from Juno to Luna?
The eclipse question and answer area recommendations are:
1, add a new version of the warehouse
1.Window > Preferences > Install/update > Available software Sites
2. Click ' Add '
3. Enter the URL for the new version of the repository (e.g. to upgrade to the Luna version, enter http://download.eclipse.org/releases/luna/)
4. Click ' Ok '
2.Help > Check for Updates
3. Click Finish and then remind restart Eclipse to confirm it.
Using this way to upgrade eclipse personal feel is the best, although you can also download the new version of the decompression, and then select the original workspace, but may be downloaded before some plug-ins are not, need to reinstall. Upgrading eclipse solves the problem of the MAVEN plugin not being installed, and the person feels the best solution, after all, the new version of Eclipse will give you more help, and you'll need it sooner or later.

I tried many times, and my Galileo version of Eclipse was never able to install the Maven plugin, so I downloaded the latest version of Eclipse from Neon, with support for MAVEN. But since we're still using jdk1.6, and the latest neon version of Eclipse doesn't support jdk1.6, you need to change the version of the JDK that's included in the computer environment variable. Compile can use jdk1.6, that is, Eclipse startup and compilation do not need to use a unified JDK, that is, the development of the JDK and Eclipse started using the JDK does not conflict, so it is a bit troublesome, so I re-download a Luna version of the Eclipse,luna version comes with the Mave n support, directly omit the MAVEN plugin installation step.

  To start configuring MAVEN:
Check that the Maven plugin for Eclipse is installed successfully: Window-to-Preferences, if a maven directory appears, the Maven plugin for Eclipse was installed successfully
1. Click the Add button to select the path value of your native MAVEN installation

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


Then you can create a new MAVEN project in Eclipse!

Installing the MAVEN plugin summary in 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.