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
How does eclipse install the maven3 plug-in online?
I don't want to install it online. It's a bit disgusting.
1 Maven download
Official download URL: Workshop.
2 download Eclipse plug-in M2Eclipse
This plug-in is installed online for eclipse/Myeclipse.
Eclipse Installation Method: on the menu bar, select Help -- Install New Software... Then you will see an Install dialog box. Click the Add button next to the "Work with:" field. You will get a new "Add Repository" dialog box, and enter m2e In the Name field, enter the online installation address in the Location field and click OK. Eclipse downloads the resources on the m2eclipse installation site.
MyEclipse Installation Method: select software updates from the help menu, select find and install, and select search for new features to install-select new remote site. Write name: maven URL: Enter the online installation address to download the relevant jar package and plug-in.
The online installation address of M2eclipse is:
Official Website: www.eclipse.org/m2e/download/
Bytes.
Wiki URL: wiki.eclipse.org/M2E_updatesite_and_gittags
In addition, during the test, some versions of myeclipse do not support online plug-in installation, therefore, you need to download the local installation package to install the eclipse/myeclipse plug-in.
There is no official address for local download (I did not find it during the test), so you need to download it from Baidu. Pay attention to the time when downloading the file. Generally, the older the file version, the more likely it will be, therefore, we recommend that you back the download time.
Artifacts. xml, content. xml, site. xml should be an update file, and there is no actual location in the actual installation. You only need to put the featrues and plugins folders under the installation directory of Myeclipse/Eclipse, and place them directly to the corresponding location, sometimes you can just put the plug-ins file...
How does eclipse install the maven3 plug-in online?
I don't want to install it online. It's a bit disgusting.
1 Maven download
Official download URL: Workshop.
2 download Eclipse plug-in M2Eclipse
This plug-in is installed online for eclipse/Myeclipse.
Eclipse Installation Method: on the menu bar, select Help -- Install New Software... Then you will see an Install dialog box. Click the Add button next to the "Work with:" field. You will get a new "Add Repository" dialog box, and enter m2e In the Name field, enter the online installation address in the Location field and click OK. Eclipse downloads the resources on the m2eclipse installation site.
MyEclipse Installation Method: select software updates from the help menu, select find and install, and select search for new features to install-select new remote site. Write name: maven URL: Enter the online installation address to download the relevant jar package and plug-in.
The online installation address of M2eclipse is:
Official Website: www.eclipse.org/m2e/download/
Bytes.
Wiki URL: wiki.eclipse.org/M2E_updatesite_and_gittags
In addition, during the test, some versions of myeclipse do not support online plug-in installation, therefore, you need to download the local installation package to install the eclipse/myeclipse plug-in.
There is no official address for local download (I did not find it during the test), so you need to download it from Baidu. Pay attention to the time when downloading the file. Generally, the older the file version, the more likely it will be, therefore, we recommend that you back the download time.
Artifacts. xml, content. xml, site. xml should be an update file, and there is no actual location in the actual installation. You only need to put the featrues and plugins folders under the installation directory of Myeclipse/Eclipse, and place them directly to the corresponding location, sometimes you can just put the plug-ins file...