Configure and use Maven in Eclipse
Build a Maven development environment under Eclipse.
Now we need to use Eclipse to develop Maven projects. We need to configure Maven in a simple way.
1. Download the Maven installation package.
2. If you directly use the Apache image library, you do not need to modify the configuration, and Maven can also be used normally. But foreign websites sometimes because of some firewall reasons sometimes slow access, you can add the Ali Image Library, in the apache-maven-3.5.2 \ conf \ settings. add an image library configuration under the mirrors label in the xml file.
<Mirrors>
<! -- Add configurations of Alibaba Cloud backup storage in China -->
<Mirror>
<Id> aliyun </id>
<Name> aliyun Maven </name>
<MirrorOf> * </mirrorOf>
<Url> http://maven.aliyun.com/nexus/content/groups/public/ </url>
</Mirror>
</Mirrors>
3. Configure Eclipse. Now, the new version of Eclipse is integrated with the Maven plug-in. You don't need to install it manually. Configure the Maven configuration file directly in preferences and select your settings configuration file, click Update Settings to Update the configuration.
4. If you have modified the image library, you can check whether Maven Repositories has taken effect.
You can re-index to improve search efficiency.
5. Create a New Maven Project
You can skip this step.
Enter the following information based on the actual situation, and click Finish to create the project.
6. Now the project has an error message because there is no web. xml file. Right-click to generate one automatically.
Next, add the dependent jar package. You can directly edit pom. xml or operate it using a visual tool. The effect is the same.
After saving the package, the configuration dependency package will be downloaded from the Maven library. You can view it here.
To update the dependency package later, use this menu.
At this point, the building process of a Maven project is over, and the rest of the work is for the project itself.