Maven study notes 1--configuration in myeclipse10

Today, after a day of tinkering, I finally created a maven web application on myeclipse. It is really not easy, and there are various problems during the period.

Well, record it.

maven environment configuration

1. Go to the maven official website to download a maven package, the download address is: https://maven.apache.org/download.cgi

2. Unzip the downloaded zip package to the specified local file directory, here I am: F:\tools\frame-jars\maven

3. Configure the environment variables of maven. This configuration is somewhat similar to the configuration of jdk . "M2_HOME" or "MAVEN_HOME" is configured as: F:\tools\frame-jars\maven\apache-maven-3.3.9, "PATH" is configured as: F:\tools\frame-jars\maven\apache-maven- 3.3.9\bin

4. Test whether the maven configuration is successful, open the cmd command tool, and enter mvn -version to check whether the configuration is successful

At this point, the maven environment configuration is complete.

Next is to add my own maven package in myeclipse 10.

The specific steps are as follows:

1. First set Maven in MyEclipse: window>preferences>myeclipse>maven4myeclipse>installations>add. Select the maven package you just decompressed, so you can add it directly.

2. Update the address of the local repository in window>preferences>myeclipse>maven4myeclipse>user settings. My settings.xml file is in F:\tools\frame-jars\maven\apache-maven-3.3.9\conf\settings. xml

Open this file, and change the 53rd line of code to the address of the local warehouse you selected. I configure the .m2/repository file under the e disk as my local warehouse. The specific change code is : <localRepository>e:/. m2/repository</localRepository> . Of course, this personal opinion is not necessary.

Create a simple maven web project using maven

See attachment for details.

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326633333&siteId=291194637