How maven adds Jar pack dependencies to Web projects createtime--2018 April 19 19:06:21author:marydon
Development tools: Eclipse
1. Open pom.xml file--Switch to Pom.xml view--
2. On the Build tab, create a dependencies tag, and the introduction of the jar package is placed inside the tag;
3. See which jar packages are referenced by the project: Src/main/webapp/web-inf/lib, and then http://mvnrepository.com the following jar package one from the Maven repository,
Found and introduced into the Pom.xml file.
Example:
Search "Aopalliance"-click the link below--
Find the desired version and click--
Copy
Paste into the dependencies tag in the Pom.xml file
Description: You may not be able to find the jar package you need on the MAVEN website, you will need to add the jar package to the local repository using the MVN command.
Note:after the Pom.xml file has been modified to save, be sure to remember to update the project, otherwise it will be an error (the project refers to the original Pom.xml file).
The last red box shows how to update the Pom.xml file in the project.
Related recommendations:
Maven adds a jar package to the local repository
Eclipse transforms the Javaweb project into a MAVEN project
How maven adds jar package dependencies to Web projects