Maven and Maven plugin installation
Benefits of using maven :
- I feel the most important is automatic download Jar Packages and the packages it relies on to ensure that multiple people develop Jar different versions of the issue.
- Then the file structure is clear, Java files, resource files, and test files are all clearly divided.
One, MAVEN installation 1.Maven installation A, download and install
Go to the Maven website's download page:http://maven.apache.org/download.cgi, as shown in:
Download the current apache-maven-3.2.3-bin.zipand unzip it. I unzipped it to D:\Program files\.
B,MAven Warehouse location
- Find The settings.xml configuration file under maven under Conf, my D:\Program files\maven\conf\settings.xml.
- The MAVEN repository defaults to the local user's temporary folder under the. M2 folder under the Repository, now assign the warehouse to D:\Repositories\Maven, only need to open the local repository log off above, and then write the corresponding path value inside the Come on:
- So maven local repository is D:\Repositories\Maven
C. Configure Environment Variables
System variable:maven_home = D:\Program Files\maven
User variable:path =%maven_home%\bin. Open cmd, knocking inside: mvn-version If you can print the information above, it means that Maven3 has been installed on your PC.
MVN is a maven instruction,mvn-version is to view the version information, my operating system is 32-bit WIN7, the installation of MAVEN is 3.2.3. If you can print the information as above, the Maven3 is already installed.
OK, first to experience maven, in cmd execution: mvn help:system
That's when Maven downloads a bunch of stuff from the remote repository, it's OK, let it download, and sooner or later it's going to be downloaded. The next step is to install the Maven plugin in Eclipse,
2.Maven plugin installation
Install the Maven plugin in Eclipse, Introduction to three methods, recommended: Offline installation in link mode.
A, online installation
Via Help-->install New Software--add, enter the address http://m2eclipse.sonatype.org/sites/m2e, tick the option, and wait for it to download and install, Restart eclipse when you're done.
B, offline installation
First download:http://115.com/file/dpk80gj0#eclipse-maven3-plugin.7z use two ways to install eclipse-maven3-plugin.7z ,
One,link Way
- in your eclipse Create two folders under the root of the installation: links< Span style= "font-family: the song Body;" >, myplugins (name customizable), and myplugins folder
- links Create a (name customizable) file, open and enter: path=myplugins ( "\ \" &NBSP;&NBSP; "\" ).
- Restart Eclipse , after starting you open Window---> Preferences will find one more option Maven , indicating that the installation was successful. (recommended)
Second, direct way
Import the unpacked subfolders features and plugins jar package files into the Eclipse installation directory separately. in the features and plugins folders. (more wild)
3. Configure Maven A. Associate Local Maven
Window-->preferences-->maven-->installations Click the Add button to select the path value of your native installation Maven -->apply
B. Set up the local warehouse
User Settingsà Click the Browse button, select your Maven setting.xml profile, then click OK to complete the configuration of the Eclipse Maven plugin
So maven and the Maven plugin in Eclipse are installed,
If you feel the problem with Maven installation in Eclipse, you can use the STS (Spring Tool Suite) or Idea (IntelliJ).
Original creator :twosnail
Maven and Maven plugin installation