(Turn) MAVEN installation and Myeclipse+maven configuration and use

Transfer: https://blog.csdn.net/shikongshengzhu/article/details/51779159

Installation of MAVEN and configuration and use of Myeclipse+maven

Proceed as follows:

maven installation

  1. Download maven  Download apache-maven-3.3.9-bin.zip
    in https://maven.apache.org/download.cgi and extract it directly to the local.
  2. To configure environment variables 
    , please confirm that jdk1.7 or above has been installed and JAVA_HOME is configured. 
    Configure the environment variable MAVEN_HOME, such as F:\maven\apache-maven-3.3.9, my decompressed files are placed under F:\maven, so the path is as above. 
    Configure Path, add %MAVEN_HOME%\bin at the end.
  3. Open cmd and enter mvn -version to get the following: 
    write picture description here
    So far, the maven installation is successful!

Using maven in myeclipse2014

Since the maven4myeclipse of myeclipse2014 is not very easy to use, it is not avoided that the two different versions of maven have different project rules, so the maven in myeclipse2014 is also changed to maven3.3.9 that we installed above

  1. Configure maven 
    to open window–>preferences–>MyEclipse–>Maven4MyEclipse as shown below: 
    write picture description here
    Click the Add button in the upper right corner and select the root directory of maven installed above (my directory is F:\maven\apache-maven-3.3.9)

  2. Set up maven's central repository

    maven4myeclipse has the default warehouse address, in the user file .m2 directory, here we define the directory ourselves.

    First, create a new central warehouse (store the jar package to be loaded by the project), my directory is F:\maven\m2\repository, and then configure settings.xml from F:\maven\apache-maven-3.3.9\conf Copy the file to F:\maven, then open the copied settings.xml file, change the value in the localRepository tag to F:\maven\m2\repository, if the localRepository tag is commented out, open the comment, this The first step is to designate the central warehouse. 
    Then, enter the following interface 
    write picture description here

Reconfigure settings.xml as shown.

In the last step, enter the following figure 
write picture description here
to replace the default jdk with the jdk configured in the environment variable, and set the Default vm arguments as shown in the figure below. 
write picture description here 
At this point, the maven configuration in myeclipse2014 has been completed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325100985&siteId=291194637