maven3 installation:
Before installing Maven, please make sure that your JDK has been installed and configured. Maven is a project under Apache. The latest version is 3.0.4, and I use this.
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 completed, I renamed the unzipped folder to maven and placed it in 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 everyone has all equipped environment variables, so I won’t talk about the detailed steps, and I will match the attribute name and attribute value.
Open cmd and click: mvn -version
If you can print the above information, it means that Maven3 has been installed on your computer.
mvn is a command of mavn, mvn -version is to view version information, my operating system is 32-bit WIN7, and the installed maven is 3.0.4
If you can print the above information, it means that Maven3 has been installed on your computer.
Modify the maven warehouse storage location:
Find the settings.xml configuration file under conf under maven. Mine is in D:/Server/maven/conf/settings.xml
The maven repository is placed under the .m2 folder under the temporary folder of the local user. Mine is in the C:/Users/admcnm/.m2/repository directory.
Now let’s modify and specify it to our own path. I want to specify the repository to the D:/Repositories/Maven directory. I just need to open the local repository that was cancelled above.
Then write the corresponding path value into it:
OK, let’s first experience maven, knock and press Enter in cmd to execute: mvn help:system
At this time, maven will start to download a lot of things from the remote repository. It’s okay, let it download it sooner or later. Next, install the maven plug-in in eclipse.
One of the most obvious differences between using eclipse and using myeclipse is that in eclipse, you need to install a lot of plug-ins, highly integrated tools like myeclipse.
It is better not to use too much. I'm just talking about it. As for choosing eclipse or myeclipse, you still have to choose based on yourself or the environment. I'll just think I'm nonsense. OK, talk about serious business,
There are two most common ways to install plug-ins in eclipse:
1. One is to install online, which seems to be the most commonly used, that is: Help --> Install New Software, and then enter the HTTP address to install, but there is an obvious disadvantage, which is slowness!
2. One is to install offline and use the link method to install it. This method has better pullability and can plug in and unplug the plug-in at any time, which is very convenient.
eclipse maven3 installation:
1. Use the first method to install anyone, just enter the http address: http://m2eclipse.sonatype.org/sites/m2e, check the option, and wait for it to download and install, and restart eclipse after it is completed.
2. I won’t talk about the online installation above here for two reasons: First, it’s difficult to manage after installation; Second, the download is too slow; What I want to talk about next is to use the link method to install the maven3 plug-in offline.
The official website does not provide offline installation packages for maven plug-in. Generally, you can search online and you should find them if you are lucky. I have sorted out the offline installation package of maven for download by those in need.
You can download the website at the download address, or you can directly click the link here to download: //www.VeVB.COM/softs/555777.html
link offline installation of eclipse maven plugin
1. Create two folders in the root directory of your eclipse installation: links, myplugins (the name can be taken casually). My two folders are located in: D:/IDE/HELIOS/eclipse/ (for reference, use it below)
2. Unzipse-maven3-plugin.7z downloaded from my 115 network disk to the myplugins directory
3. Create a maven.txt in the links directory (the name can be taken at will), open and enter: path=D:/IDE/HELIOS/eclipse/myplugins/maven (please refer to the maven plugin above)
4. Save and close maven.txt, change the suffix to maven.link, and restart eclipse (if your eclipse is not turned on, just open it)
Check whether the maven plug-in of eclipse is installed successfully: Window --> Preferences
Configure maven:
1. Click the Add button to select the path value of the maven installed on your machine.
2. Click the Browse button, select the setting.xml configuration file of your maven, and then click OK, so that the configuration of the eclipse maven plug-in is completed.
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.