Summary install maven plug-in eclipse, eclipsemaven

Source: Internet
Author: User

Summary install maven plug-in eclipse, eclipsemaven

When I was increasingly exposed to open-source projects, I found that most open-source projects were built using maven. When developing applications, you are more and more aware that maven can solve many problems. If You Want To Know maven, refer to: Maven Getting Started Guide (1) and Maven Getting Started Guide (2 ). So I learned to use maven myself. Some of the content on the Internet referred to below has made some minor changes and indicated the source.

 

Part 1: original article link

Maven3 installation:

Before installing Maven, make sure that your JDK has been installed and configured. Maven is a project under Apache. The latest version is 3.0.4.

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 complete, decompress it. I will rename the decompressed folder to maven and put it under the D: \ Server Directory, that is, the final path of maven is: D: \ Server \ maven


Configure maven environment variables:

System variable: MAVEN_HOME = D: \ Server \ maven

User variable: path = % MAVEN_HOME % \ bin

I believe that everyone has been equipped with environment variables. The detailed steps are not mentioned, and the attribute name and attribute value are matched with OK.

Open cmd and press mvn-version.

 


If the above information is printed, Maven3 has been installed on your computer.
Mvn is an mavn command. mvn-version is used to view the version information. my operating system is a 32-bit WIN7, and the installed maven is 3.0.4.

If the above information is printed, Maven3 has been installed on your computer.


Modify the maven repository storage location:

Find the settings. xml configuration file under conf in maven. My files are in D: \ Server \ maven \ conf \ settings. xml.



By default, the maven repository is stored in the repository under the. m2 folder under the temporary folder of the local user. My repository is under the C: \ Users \ admcnm \. m2 \ repository directory,

Now let's change it to our own path. Now I want to specify the repository to the D: \ Repositories \ Maven directory, just open the local repository that was logged out above,

Then write the corresponding path value to it:

OK. First, let's get to know maven. In cmd, press enter and execute: mvn help: system.

At this time, maven will download a lot of things from the remote warehouse. It's okay to let it download. It will be downloaded sooner or later. Next, install the maven plug-in eclipse.

Then Install the eclipse plug-in online: Help --> Install New Software, and enter the HTTP address to Install (http://download.eclipse.org

), You can find the corresponding version in this link.

Finally:

Check whether the maven plug-in of eclipse is successfully installed: Window --> Preferences




Configure maven:
1. Click the Add button and select the PATH value for installing maven on your local machine.




2. Click the Browse button, select your maven setting. xml configuration file, and click OK to complete the eclipse maven plug-in configuration.

2. When installing the maven plug-in eclipse, you may encounter an error: original article link 1, original article link 21. How to solve this problem when installing m2eclipse? For error details, see.
Problem: Cannot complete the install because one or more required items cocould not be found.

Software being installed: Maven Integration for Eclipse (Required) 0.12.1.20110112-1712 (or
g.maven.ide.eclipse.feature.feature.group 0.12.1.20110112-1712)

Missing requirement: Maven Project Model Edit Bundle 0.12.1.20110112-1712 (org.maven.id
e.eclipse.maven_model_edit 0.12.1.20110112-1712) requires 'bundle org.eclipse.emf.ecore 0.
0.0' but it could not be found

Cannot satisfy dependency:

From: Maven Integration for Eclipse (Required) 0.12.1.20110112-1712 (org.maven.ide.eclip
se.feature.feature.group 0.12.1.20110112-1712)

To: org. maven. ide. eclipse. maven_model_edit [0.12.1.20110112-1712] He said a file could not be found.
. However, the relevant files exist in the Maven m2e link. I tried it many times. All have this problem.
 
Solution:First connect to Helios Update site (Helios-http://download.eclipse.org/releases/helios), install
Plug-in Graphical Editing Framework Zest Visualization Toolkit SDK. Then install M2Eclipse plug-ins.
 
 
2: If the installed plug-in version is too high, it will be reported
 
Cannot complete the install because one or more required items could not be 
 found. 
   
Software being installed: m2e - Maven Integration for Eclipse (includes I 
  
ncubating components) 1.5.0.20140606-0033 (org.eclipse.m2e.feature.feature. 
  
group 1.5.0.20140606-0033) 
   
Missing requirement: Maven Integration for Eclipse 1.5.0.20140606-0033 (o 
  
rg.eclipse.m2e.core 1.5.0.20140606-0033) requires 'bundle com.google.guava 
  
 [14.0.1,16.0.0)' but it could not be found 
  
   
Cannot satisfy dependency: 
  
     
From: Maven Integration for Eclipse 1.5.0.20140606-0033 (org.eclipse.m2 
  
e.core.ui 1.5.0.20140606-0033) 
  
     
To: bundle org.eclipse.m2e.core [1.5.0,1.6.0) 
  
   
Cannot satisfy dependency: 
  
     
From: m2e - Maven Integration for Eclipse (includes Incubating componen 
  
ts) 1.5.0.20140606-0033 (org.eclipse.m2e.feature.feature.group 1.5.0.201406 
  
06-0033) 
  
Answer: in this case, use a lower version, for example 
 Http://download.eclipse.org/technology/m2e/milestones/1.4

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.