MAVEN3 installation: Before installing Maven, it is required to make sure that your JDK is installed and configured to complete. MAVEN is a project under Apache, and the latest version is 3.0.4, and that's what I'm using.
Go to the official website to download the new maven: http://maven.apache.org/download.cgi
After the download is done, unzip it, I rename the extracted folder to maven and place it in the D:\application directory, where Maven's final path is: D:\application\maven3
To configure the MAVEN environment variable:
System variable: maven_home = D:\application\maven3
User variable: path =%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
If you can print the information above, it means that the MAVEN3 has been installed on your PC.
MVN is a mavn instruction, mvn-version is to view the version information, my operating system is 64-bit WIN8.1, the installation of MAVEN is 3.0.4
[INFO]
Scanning for projects ...
[INFO] [INFO]------------------------------------------------------------------------[INFO] Building Maven Stub Project ( No POM) 1 [INFO]------------------------------------------------------------------------[INFO] [INFO]--- Maven-help-plugin:2.2:system (DEFAULT-CLI) @ standalone-pom---[INFO] ============================================= ================================== ========================= Platform Properties Details ========================= = ==============================================================================
================================= ============================================== System Properties ================================================ =============================== Java.runtime.name=java (TM) SE Runtime Environment sun.boot.library.path=d:\java\ Jdk1.7.0_06\jre\bin java.vm.version=23.2-b09 java.vm.vendor=oracle Corporation Java.vendor.Url=http://java.oracle.com/guice.disable.misplaced.annotation.check=true path.separator=; Java.vm.name=java HotSpot (TM) 64-bit Server vm File.encoding.pkg=sun.io USER.COUNTRY=CN user.script= sun.java.launcher =sun_standard sun.os.patch.level= Java.vm.specification.name=java Virtual Machine Specification user.dir=C:\Users\
Jacarri\desktop java.runtime.version=1.7.0_06-b24 java.awt.graphicsenv=sun.awt.win32graphicsenvironment java.endorsed.dirs=d:\java\jdk1.7.0_06\jre\lib\endorsed Os.arch=amd64 Java.io.tmpdir=c:\users\jacarri\appdata\
Local\temp\ line.separator= java.vm.specification.vendor=oracle Corporation user.variant= os.name=windows 8 Classworlds.conf=d:\application\maven3\bin\. \bin\m2.conf SUN.JNU.ENCODING=GBK Java.library.path=d:\java\jdk1.7.0_06\bin; C:\Windows\Sun\Java\bin; C:\Windows\system32; C:\Windows; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86) \intel\services\ipt\;D: \java\jdk1.7.0_06\bin;d:\applicatIon\maven3\bin;d:\application\mysql-5.5.21-winx64\bin;d:\program Files\tortoisesvn\bin;d:\program Files\
Tortoisegit\bin;d:\application\apache-ant-1.8.4\bin;d:\application\android-sdk-windows\platform-tools;;. Java.specification.name=java Platform API Specification java.class.version=51.0 sun.management.compiler=hotspot 64- Bit tiered Compilers os.version=6.2 User.home=c:\users\jacarri User.timezone=asia/shanghai java.awt.printerjob= Sun.awt.windows.WPrinterJob File.encoding=utf-8 java.specification.version=1.7 java.class.path=d:\application\ Maven3\bin\. \boot\plexus-classworlds-2.4.jar User.name=jacarri java.vm.specification.version=1.7 sun.java.command=
Org.codehaus.plexus.classworlds.launcher.Launcher Help:system Java.home=d:\java\jdk1.7.0_06\jre sun.arch.data.model=64 User.language=zh java.specification.vendor=oracle Corporation awt.toolkit= Sun.awt.windows.WToolkit java.vm.info=mixed mode java.version=1.7.0_06 java.ext.dirs=d:\java\jdk1.7.0_06\jre\lib\ Ext C:\Windows\Sun\Java\lib\ext suN.boot.class.path=d:\java\jdk1.7.0_06\jre\lib\resources.jar;d:\java\jdk1.7.0_06\jre\lib\rt.jar;d:\java\ Jdk1.7.0_06\jre\lib\sunrsasign.jar;d:\java\jdk1.7.0_06\jre\lib\jsse.jar;d:\java\jdk1.7.0_06\jre\lib\jce.jar;d
: \java\jdk1.7.0_06\jre\lib\charsets.jar;d:\java\jdk1.7.0_06\jre\lib\jfr.jar;d:\java\jdk1.7.0_06\jre\classes
Java.vendor=oracle Corporation maven.home=d:\application\maven3\bin\.
File.separator=\ Java.vendor.url.bug=http://bugreport.sun.com/bugreport/sun.io.unicode.encoding=unicodelittle Sun.cpu.endian=little sun.desktop=windows sun.cpu.isalist=amd64 ================================================= ============================== Environment Variables ============================================================ =================== classworlds_jar= "D:\application\maven3\bin\. \boot\plexus-classworlds-2.4.jar "Psmodulepath=c:\windows\system32\windowspowershell\v1.0\modules\ PROGRAMW6432= C:\Program files Commonprogramw6432=c:\program Files\Common Files Mvn_home=d:\application\mavEn3 Processor_architecture=amd64 Classworlds_launcher=org.codehaus.plexus.classworlds.launcher.launcher Programdata=c:\programdata Fp_no_host_check=no Path=c:\windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86) \intel\services\ipt\;D: \java\jdk1.7.0_06\bin;d:\application\maven3\bin;d:\application\ Mysql-5.5.21-winx64\bin;d:\program Files\tortoisesvn\bin;d:\program files\tortoisegit\bin;d:\application\
Apache-ant-1.8.4\bin;d:\application\android-sdk-windows\platform-tools;
Android_home=d:\application\android-sdk-windows ant_home=d:\application\apache-ant-1.8.4 SYSTEMROOT=C:\Windows Tmp=c:\users\jacarri\appdata\local\temp ProgramFiles (X86) =c:\program Files (x86) computername=jacarri-pc OS=Windows _nt mysql_home=d:\application\mysql-5.5.21-winx64 prompt= $P $g windir=c:\windows systemdrive=c:comspec=c:\windows\ System32\cmd.exe homedrive=c:logonserver=\\microsoftaccount processor_identifier=intel64 Family 6 Model Stepping 7, Genuineintel programfiles=c:\program files Commonprogramfiles=c:\program Files\Common Files COMMONPROGRAMFILES (X86) = C:\Program files (x86) \common files Temp=c:\users\jacarri\appdata\local\temp number_of_processors=4 userdomain=
JACARRI-PC m2_home=d:\application\maven3\bin\. Home=c:\users\jacarri processor_level=6 error_code=0 sessionname=console Username=jacarri PATHEXT=.COM;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH;. MSC maven_opts=-xx:maxpermsize=128m-dfile.encoding=utf-8 exe4j_java_home=d:\java\jre7\ ASL.
Log=destination=file userdomain_roamingprofile=jacarri-pc public=c:\users\public PROCESSOR_REVISION=2a07 Userprofile=c:\users\jacarri appdata=c:\users\jacarri\appdata\roaming Homepath=\users\jacarri LOCALAPPDATA=C:\ Users\jacarri\appdata\local java_home=d:\java\jdk1.7.0_06 Maven_cmd_line_args=help:system ALLUSERSPROFILE=C:\ ProgramData maven_java_exe= "D:\Java\jdk1.7.0_06\bin\java.exe" [INFO]-------------------------------------------- ----------------------------[INFO] BUILD SUCCESS [INFO]------------------------------------------------------------------------[INFO] Total time:2.812s [INFO] Finished At:fri Dec 11:53:31 CST [INFO] Final memory:8m/116m [INFO]--------------------------------------------
----------------------------
If you can print the information above, it means that the MAVEN3 has been installed on your PC.
To modify the MAVEN repository storage location:
The main is to facilitate the system after the change without having to download the jar package, find maven under the Conf settings.xml configuration file, mine is in D:\application\maven3\conf\settings.xml
The MAVEN repository defaults to the. M2 folder under the local user's Temp folder under Repository, mine is under the C:\Users\jacarri\.m2\repository directory,
Now let's modify to assign it to our own path, I'm now going to assign the repository to the D:\application\repository directory, just open the local repository that was logged off.
Then write the corresponding path value in it:
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.
One of the most obvious differences between using eclipse and using MyEclipse is that in eclipse you need to install a lot of plugins, such as MyEclipse, a highly integrated tool,
Or do not use too much as well, I am just saying, as to choose Eclipse or myeclipse or to see oneself or the environment to choose, on the above when I was talking nonsense. Well, that's a good thing.
Eclipse Installation Plugin:
Install on-line help-and install New software, and then enter the HTTP address for installation.
Eclipse MAVEN3 Installation:
Enter the HTTP address: http://m2eclipse.sonatype.org/sites/m2e, tick the option, and wait for it to download and install, then restart Eclipse after the completion.
It seems that Sonatype has given the plugin to Eclipse fund management, so this address is invalid.
If you are in Eclipse Indigo and below, you cannot install the M2E plug-in provided by Eclipse: the full operating environment is not available. You can go down here. 0.12.1 version Download: http://repository.sonatype.org/content/repositories/forge-sites/m2e/0.12.1/S/0.12.1.20110112-1712/
Check that the Maven plugin for Eclipse is installed successfully: Window--Preferences
To configure MAVEN:
1. Click the Add button to select the configuration file in 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
2. Click the Browse button, select your Maven setting.xml profile, then click OK so that the Eclipse plugin and console mvn use the same configuration file.